If the "fooString" values in the index are "AAA", "bbb" and "CCC", they would be ordered by the above code as "AAA, "CCC, "bbb", whereas I'd want them to return as "AAA", "bbb", "CCC"
Where have you specified your analyser? Which analyser are you using?
If you run your query in the umbraco backend (using the developer dashboard/Examine Management/Your Searcher) using the lucene syntax, are the results as selected?
If that is not working, have you tried LUKE double check your query?
Examine order by string case insensitive?
Has anyone worked out to OrderBy a string with Examine case insensitively? For example:
If the "fooString" values in the index are "AAA", "bbb" and "CCC", they would be ordered by the above code as "AAA, "CCC, "bbb", whereas I'd want them to return as "AAA", "bbb", "CCC"
Or your indexer needs to index in lowercase, or your analyser needs to be case insensitive.
There is an old, but very well explained, blogpost by Aaron on how to rule on text casing with examin.
Damiaan is spot on, AFAIK. I'd go with a case-insensitive Analyser (such as the
StandardAnalyzer
)One of my indexes is using the StandardAnalyser but still has the issue, which is weird. Also, I forgot to mention I'm using Umbraco 7.5.6
The analyser runs when things are indexed. So if you change your analyser, you need to reindex. Have you done this?
Yeah, multiple times.
Where have you specified your analyser? Which analyser are you using?
If you run your query in the umbraco backend (using the developer dashboard/Examine Management/Your Searcher) using the lucene syntax, are the results as selected?
If that is not working, have you tried LUKE double check your query?
I have specified my analyzer in ExamineSettings, under providers:
Yeah I tried searching in the umbraco backend; the results are as expected, but as there is no ordering specified there's no way to test that there.
Yeah I've been using LUKE a bit. Is it possible to set the ordering when searching though?
is working on a reply...