Hello there,
I have a quite basic question but my Solr is behaving in a way I'm not quite
sure of why it does so.
The setup is simple: I have a field "suggestionText" in which single strings
are indexed. Schema:
<field name="suggestionText" type="prefixNGram" indexed="true" stored="true"/>
Since I want this field to serve for a suggestion-search, the input string is
analyzed by a EdgeNGramFilter.
Lets have a look on two cases:
case1: Input string was 'il2'
case2: Input string was 'il24'
As I can see from the Solr-admin-analysis-page, case1 is analysed as
i
il
il2
and case2 as
i
il
il2
il24
As you would expect. The point now is: When I search for 'il2' I would expect
case1 to have a higher score than case2. I thought this way because I did not
omit norms and thus I thought, the shorter field would get a (slightly) higher
score. However, the scores in both cases are identical and so it happens that
'il24' is suggested prior to 'il2'.
Perhaps I did understand the norms or the notion of "field length" wrong. I
would be grateful if you could help me out here and give me advice on how to
accomplish the wished behavior.
Thanks and best regards,
Erik