I have two documents and using Luke to investigate, I have confirmed in code that it has the same behavior, using StandardAnalyzer
.
Document one with boost 1
stored/uncompressed,indexed,tokenized<Description:Nummer ett>
stored/uncompressed,indexed,tokenized<Id:2>
stored/uncompressed,indexed,tokenized<Name:Apa>
Document two with boost 2
stored/uncompressed,indexed,tokenized<Description:Nummer tvÄ>
stored/uncompressed,indexed,tokenized<Id:1>
stored/uncompressed,indexed,tokenized<Name:Apa>
Search apa in field Name Returns with boost used and in the correct order.
Document 2 has Score 1,1891
Document 1 has Score 0.5945
Search ap* Returns in no order and same score
Document 1 Score 1.0000
Document 2 Score 1.0000
Search apa* Returns in no order and same score
Document 1 Score 1.0000
Document 2 Score 1.0000
Why is this? I would like to return some documents with higher boost value even if I have to use wildcards. Is this possible?
Cheers all cool coders out there!
This is what I want to accomplice.
A search string and want matches. Using wildcard. Search "Lu" +"*"
Document
Name
City
I would like the Document whose Name is Lund to get higher rating than the document with the Name Lunt or City is Lund for example. This is due to I will know which documents that are most popular. I want to get the documents with city Stockholm and names Stockholm and Stockholmen but ordered as I choose.