(order string)
| 250 | } |
| 251 | |
| 252 | func (s *SearchAlgolia) getIndexName(order string) string { |
| 253 | // main index |
| 254 | var idx = s.Config.Index |
| 255 | switch order { |
| 256 | case NewestIndex: |
| 257 | // the index of sort results by newest |
| 258 | idx = idx + "_" + NewestIndex |
| 259 | case ActiveIndex: |
| 260 | // the index of sort results by active |
| 261 | idx = idx + "_" + ActiveIndex |
| 262 | case ScoreIndex: |
| 263 | // the index of sort results by score |
| 264 | idx = idx + "_" + ScoreIndex |
| 265 | } |
| 266 | return idx |
| 267 | } |
no outgoing calls
no test coverage detected