docValues & facets

2019-06-10 Thread John Davis
Hi there, We recently changed a field from TextField no docValues to SortableTextField which has docValues enabled by default. Once we did this we do not see any facet values for the field. I know that once all the docs are re-indexed facets should work again, however can someone clarify the curren

Re: FuzzyQuery

2019-06-10 Thread Atri Sharma
I would suggest using a QueryParser for your fuzzy query before adding it to the Boolean query. This should weed out any case issues. On Mon, 10 Jun 2019 at 8:06 PM, wrote: > BooleanQuery.Builder booleanQuery = new BooleanQuery.Builder(); > > //First set > > booleanQuery.add(new FuzzyQue

Re: FuzzyQuery

2019-06-10 Thread baris . kazar
Somehow " is causing an issue as this should return street with MAIN: [contentDFLT:street="MAINS"~2, +contentDFLT:"city nashua", +contentDFLT:"region new-hampshire", +contentDFLT:"country united states"] Best regards On 6/10/19 2:24 PM, baris.ka...@oracle.com wrote: [+contentDFLT:"city nashu

Re: Lucene FuzzyQuery

2019-06-10 Thread Atri Sharma
> 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. How long are your query terms and the actual word? For fuzzy query to match, your edit distance needs to be less than the smaller of the query and the actual w

Re: FuzzyQuery

2019-06-10 Thread baris . kazar
[+contentDFLT:"city nashua", +contentDFLT:"region new-hampshire", +contentDFLT:"country united states", contentDFLT:street contentDFLT:mains] QueeryParser chops it into two pieces from parser.parser("street=\"MAINS\""); Index has a TextField named contentDFLT the following data : street="MAIN

Re: FuzzyQuery

2019-06-10 Thread Tomoko Uchida
Or, " (double quotation) in your query string may affect query parsing. When I parse this string by classic query parser (lucene 8.1), street="MAINS~" parsed (raw) query is text:street text:mains (I set the default search field to "text", so text: is appeared here.) Query parsing is a complex

Re: FuzzyQuery

2019-06-10 Thread Tomoko Uchida
Hi, I noticed one small thing in your previous mail. > when i use q1 = parser.parse("street=\"MAIN\""); i get same results which is good. To specify a search field, ":" (colon) should be used instead of "=". See the query parser documentation: http://lucene.apache.org/core/8_1_0/queryparser/org/

Re: FuzzyQuery

2019-06-10 Thread baris . kazar
booleanQuery.add(Utils.createPhraseQuery(phraseAnalyzer, field, "city=\"NASHUA\""), BooleanClause.Occur.MUST);     booleanQuery.add(Utils.createPhraseQuery(phraseAnalyzer, field, "region=\"NEW HAMPSHIRE\""), BooleanClause.Occur.MUST);     booleanQuery.add(Utils.createPhraseQuery(phraseAna

Re: FuzzyQuery

2019-06-10 Thread Tomoko Uchida
Hi, just for the basic verification, can you find the document without fuzzy query? I mean, does this query work for you? Query query = parser.parse("MAIN"); Tomoko 2019年6月11日(火) 0:22 : > > why cant the second set not work at all? > > it is indexed as Textfield like street="..." city="..." etc.

Re: FuzzyQuery

2019-06-10 Thread baris . kazar
why cant the second set not work at all? it is indexed as Textfield like street="..." city="..." etc. Best regards On 6/10/19 11:23 AM, baris.ka...@oracle.com wrote: i dont know how to use Fuzzyquery with queryparser but probably You are suggesting QueryParser parser = new QueryParser(fiel

Re: FuzzyQuery

2019-06-10 Thread baris . kazar
i dont know how to use Fuzzyquery with queryparser but probably You are suggesting QueryParser parser = new QueryParser(field, analyzer) ; Query query = parser.parse("MAINS~2"); booleanQuery.add(query, BooleanClause.Occur.SHOULD); am i right? Best regards On 6/10/19 10:47 AM, Atri Sharma wro

Re: FuzzyQuery

2019-06-10 Thread baris . kazar
i am using standardanalyzer. Best regards On 6/9/19 11:22 AM, Tomoko Uchida wrote: Hi, What analyzer do you use for the text field? Is the term "Main" correctly indexed? 2019年6月8日(土) 9:13 Baris Kazar : Hi,- i cant get FuzzyQuery working for searching with a query like Mains~2 to find the

Re: FuzzyQuery

2019-06-10 Thread baris . kazar
How do i check how it is indexed? lowecase or uppercase? only way is now to by testing. i am using standardanalyzer. Best regards On 6/9/19 11:57 AM, Atri Sharma wrote: On Sun, Jun 9, 2019 at 8:53 PM Tomoko Uchida wrote: Hi, What analyzer do you use for the text field? Is the term "Main"