For problem#1 the following fuzzyquery ALONE does not catch any results when i run it  alone in the BooleanQuery and with either SHOULD or MUST occurrence. such as:

[contentDFLT:MAIN~2]


For problem#1 again the query is as follows:

[+contentDFLT:"street", ->PhraseQuery

contentDFLT:"mains~2", -> FuzzyQuery

contentDFLT:"st", -> PhraseQuery

+contentDFLT:"city", ->PhraseQuery

contentDFLT:nasua~2, ->FuzzyQuery

+contentDFLT:"municipality", -> PhraseQuery

+contentDFLT:"hillsborough", ->PhraseQuery

+contentDFLT:"region", ->PhraseQuery

contentDFLT:"new-hampshire", ->PhraseQuery

+contentDFLT:"country", ->PhraseQuery

contentDFLT:"united", ->PharseQuery

contentDFLT:"states"->PhraseQuery]


where + means MUST.

Best regards


On 6/7/19 2:24 PM, baris.ka...@oracle.com wrote:
Sure, i will try that: and lets mark this problem as problem#1.


something else is also happening: lets mark this as problem#2.

i make sure i specify a string with 1 edit away misspelled and that never gets hit but the word with correct spelling is in the index.


Best regards

On 6/7/19 2:02 PM, Atri Sharma wrote:
Is your FuzzyQuery matching any documents at all?

It would be helpful if you could post your entire query. It might be
happening that your Fuzzy query is not matching any hits, but when you
specify it as a MUST clause, then it becomes a necessary condition for
any hit to be returned by your overall query. However, with MUST
clause, that restriction is lifted.

Can you try running the FuzzyQuery independently (outside the
BooleanQuery) and see if you get any hits?

On Fri, Jun 7, 2019 at 11:27 PM <baris.ka...@oracle.com> wrote:
May i ask this question about FuzzyQuery?

When i select BooleanClause.Occur.MUST for a FuzzyQuery i dont get any
results back but with

Occur.SHOULD i get some results, though.

what is the meaning of Occur.MUST for FuzzyQuery?

I want Lucene to give me best result from FuzzyQuery, i thought that is
good use for Occur.MUST.

Best regards



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to