You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "Lochschmied, Alexander" <Al...@vishay.com> on 2012/08/14 10:02:10 UTC

Unexpected function query sort

strdist() doesn't seem to work for me (using Solr 3.6.0).

I use a query like this one:
?fl=mycol
&start=0
&rows=20
&q=mycol:abcd OR othercol:abcd
&fq=somecol:someval
&sort=strdist('abcd',mycol,edit) asc

I would have expected all documents with mycol == 'abcd' to be on top of the results (or at the bottom). Is that correct assumption?
I see however results starting with such documents (which is good), then documents without any value for mycol and then again some with mycol == 'abcd'.

mycol definition is pretty basic:
<fieldType name="text_splitting" class="solr.TextField" positionIncrementGap="100">
  <analyzer>
                <tokenizer class="solr.WhitespaceTokenizerFactory"/>
                <filter class="solr.LowerCaseFilterFactory"/>
  </analyzer>
</fieldType>

Is there a way to debug such (sort) function queries? Can I see the calculated sort value for example?

Thanks,
Alexander