Re: FuzzyQuery- why is it ignored?

2019-06-25 Thread baris . kazar
accept my apologies for not confirming the sent address. i will try 8.1 tomorrow on my env. baris - Original Message - From: tomoko.uchida.1...@gmail.com To: java-user@lucene.apache.org Sent: Saturday, June 22, 2019 10:35:26 PM GMT -05:00 US/Canada Eastern Subject: Re: FuzzyQuery- why is it

Re: FuzzyQuery- why is it ignored?

2019-06-22 Thread Baris Kazar
my env. baris - Original Message - From: tomoko.uchida.1...@gmail.com To: java-user@lucene.apache.org Sent: Saturday, June 22, 2019 10:35:26 PM GMT -05:00 US/Canada Eastern Subject: Re: FuzzyQuery- why is it ignored? Please send messages to java-user mail list only. It is not recommended

Re: FuzzyQuery- why is it ignored?

2019-06-22 Thread Tomoko Uchida
gt; baris > > - Original Message - > From: tomoko.uchida.1...@gmail.com > To: baris.ka...@oracle.com > Sent: Saturday, June 22, 2019 9:14:22 PM GMT -05:00 US/Canada Eastern > Subject: Re: FuzzyQuery- why is it ignored? > > > If You could index these entries and stil

Re: FuzzyQuery- why is it ignored?

2019-06-22 Thread Baris Kazar
s a bug in Lucene 6.6. Best regards - Original Message - From: baris.ka...@oracle.com To: java-user@lucene.apache.org, tomoko.uchida.1...@gmail.com, erickerick...@gmail.com, a...@linux.com, baris.ka...@oracle.com, luc...@mikemccandless.com Sent: Thursday, June 13, 2019 10:49:05 AM GMT -05:00 US/C

Re: FuzzyQuery- why is it ignored?

2019-06-19 Thread baris . kazar
thanks for confirming. StandardAnalyzer does not do stemming. So, MAINS case has some other reason. Best regards - Original Message - From: tomoko.uchida.1...@gmail.com To: java-user@lucene.apache.org Sent: Sunday, June 16, 2019 4:39:29 AM GMT -05:00 US/Canada Eastern Subject: Re: FuzzyQuery

Re: FuzzyQuery- why is it ignored?

2019-06-16 Thread Baris Kazar
16, 2019 4:39:29 AM GMT -05:00 US/Canada Eastern Subject: Re: FuzzyQuery- why is it ignored? Hi, you said you are using standard analyzer. If so, you are not using any stemmer at all (please see the analyzer's Javadocs). 2019年6月16日(日) 11:43 Baris Kazar : > > Hello,- > Erick ex

Re: FuzzyQuery- why is it ignored?

2019-06-16 Thread Tomoko Uchida
ck...@gmail.com, a...@linux.com, baris.ka...@oracle.com, > luc...@mikemccandless.com > Sent: Thursday, June 13, 2019 10:48:47 AM GMT -05:00 US/Canada Eastern > Subject: Re: FuzzyQuery- why is it ignored? > > i see, i am using an older version 6.6 and we should switch to Your 8.1 &g

Re: FuzzyQuery- why is it ignored?

2019-06-15 Thread Baris Kazar
To: java-user@lucene.apache.org, tomoko.uchida.1...@gmail.com, erickerick...@gmail.com, a...@linux.com, baris.ka...@oracle.com, luc...@mikemccandless.com Sent: Thursday, June 13, 2019 10:48:47 AM GMT -05:00 US/Canada Eastern Subject: Re: FuzzyQuery- why is it ignored? i see, i am using an older

Re: FuzzyQuery- why is it ignored?

2019-06-13 Thread baris . kazar
work ok any consonant at the end except s works in this case. Case #3 had +contentDFLT:mains~2 but not +contentDFLT:"mains~2". i am using fuzzy query with ~ from Query.builder and that is not PhraseQuery. Similarly FuzzyQuery with input "mains" (it has to be lowercase since

Re: FuzzyQuery- why is it ignored?

2019-06-13 Thread Tomoko Uchida
ote: > >>>> > >>>> Tomoko,- > >>>> > >>>> That is strange indeed. > >>>> > >>>> Something is wrong when i use mains but maink, mainl, mainr,mainq, > >>>> maint all work ok any consonant at

Re: FuzzyQuery- why is it ignored?

2019-06-13 Thread baris . kazar
ins~2". i am using fuzzy query with ~ from Query.builder and that is not PhraseQuery. Similarly FuzzyQuery with input "mains" (it has to be lowercase since it does not go through StandardAnalyzer) is also not PhraseQuery. can there be a clearer sample case for ComplexPhraseQuery

Re: FuzzyQuery- why is it ignored?

2019-06-13 Thread baris . kazar
, mainl, mainr,mainq, maint all work ok any consonant at the end except s works in this case. Case #3 had +contentDFLT:mains~2 but not +contentDFLT:"mains~2". i am using fuzzy query with ~ from Query.builder and that is not PhraseQuery. Similarly FuzzyQuery with input "mains

Re: FuzzyQuery- why is it ignored?

2019-06-13 Thread baris . kazar
+contentDFLT:"mains~2". i am using fuzzy query with ~ from Query.builder and that is not PhraseQuery. Similarly FuzzyQuery with input "mains" (it has to be lowercase since it does not go through StandardAnalyzer) is also not PhraseQuery. can there be a clearer sample case fo

Re: FuzzyQuery- why is it ignored?

2019-06-13 Thread Erick Erickson
from Query.builder and that is not PhraseQuery. > > Similarly FuzzyQuery with input "mains" (it has to be lowercase since it does > not go through StandardAnalyzer) is also not PhraseQuery. > > can there be a clearer sample case for ComplexPhraseQuery please in the docs? > >

Re: FuzzyQuery- why is it ignored?

2019-06-13 Thread baris . kazar
uilder and that is not PhraseQuery. Similarly FuzzyQuery with input "mains" (it has to be lowercase since it does not go through StandardAnalyzer) is also not PhraseQuery. can there be a clearer sample case for ComplexPhraseQuery please in the docs? did You also index "MAI

Re: FuzzyQuery- why is it ignored?

2019-06-12 Thread Tomoko Uchida
parser for such complex phrase query. https://lucene.apache.org/core/8_1_0/queryparser/org/apache/lucene/queryparser/complexPhrase/ComplexPhraseQueryParser.html Tomoko 2019年6月13日(木) 6:16 : > > Ok, i think only this very specific only "mains" has an issue. > > all i knew about L

Re: FuzzyQuery- why is it ignored?

2019-06-12 Thread baris . kazar
Ok, i think only this very specific only "mains" has an issue. all i knew about Lucene was fine :) Great... i have one more question: which one is advised to use: FuzzyQuery or the Query.parser with search string~ appended? The second one will go through analyzer and make sea

Re: FuzzyQuery- why is it ignored?

2019-06-12 Thread baris . kazar
ROUGH NEW HAMPSHIRE UNITED STATES Why is the fuzzy query ignored? Even if i have separate fields for street, city,region, country, this fuzzy query issue will come into place for words with multiple parts like main dunstable etc., right? Best regards On 6/12/19 11:36 AM, baris.ka...@oracle

Re: FuzzyQuery

2019-06-12 Thread baris . kazar
Tomoko,-  Thank You for Your suggestions. i am trying to understand it and i thought i did :) but it does not work with FuzzyQuery when i used with a *single* large TextField like street=...value... city=...value... region=...value... country=...value... (with or without quotes for the

Re: FuzzyQuery

2019-06-11 Thread Tomoko Uchida
t regards > > > On 6/10/19 2:46 PM, baris.ka...@oracle.com wrote: > > Somehow " is causing an issue as this should return street with MAIN: > > > > [contentDFLT:street="MAINS"~2, +contentDFLT:"city nashua", > > +contentDFLT:"region

Re: FuzzyQuery

2019-06-11 Thread baris . kazar
eturn street with MAIN: [contentDFLT:street="MAINS"~2, +contentDFLT:"city nashua", +contentDFLT:"region new-hampshire", +contentDFLT:"country united states"] -> this was with fuzzyquery on MAINS Best regards On 6/10/19 2:24 PM, baris.ka...@oracle.com

Re: FuzzyQuery

2019-06-10 Thread Atri Sharma
anQuery.add(new FuzzyQuery(new > org.apache.lucene.index.Term(field, "MAINS")), BooleanClause.Occur.SHOULD); > booleanQuery.add(Utils.createPhraseQuery(phraseAnalyzer, field, > "NASHUA"), BooleanClause.Occur.MUST); > booleanQuery.add(Utils.createPhra

Re: FuzzyQuery

2019-06-10 Thread baris . kazar
But when i switch to MAINS~ then fuzzy query does not work. i need to say something with the q1 only in the booleanquery: it tries to match the MAIN in street, city, region and country which are in a single TextField field. But i dont want this. that is why i need to street="..." etc wh

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
hen i switch to MAINS~ then fuzzy query does not work. i need to say something with the q1 only in the booleanquery: it tries to match the MAIN in street, city, region and country which are in a single TextField field. But i dont want this. that is why i need to street="..." etc when searchin

Re: FuzzyQuery

2019-06-10 Thread Tomoko Uchida
i switch to MAINS~ then fuzzy query does not work. > > > > > > i need to say something with the q1 only in the booleanquery: > > it tries to match the MAIN in street, city, region and country which are > > in a single TextField field. > > But i dont want th

Re: FuzzyQuery

2019-06-10 Thread Tomoko Uchida
> in a single TextField field. > But i dont want this. that is why i need to street="..." etc when searching. > > Best regards > > > > On 6/10/19 11:31 AM, Tomoko Uchida wrote: > > Hi, > > > > just for the basic verification, can you find the doc

Re: FuzzyQuery

2019-06-10 Thread baris . kazar
On 6/10/19 11:31 AM, Tomoko Uchida wrote: 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 a

Re: FuzzyQuery

2019-06-10 Thread Tomoko Uchida
t="..." 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(fi

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 pars

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, A

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

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"

Re: FuzzyQuery

2019-06-09 Thread Atri Sharma
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" > correctly indexed? Agreed. Also, it would be good if you could post your actual code. What analyzer are you using? If you are using StandardAnalyzer, then all of your

Re: FuzzyQuery

2019-06-09 Thread Tomoko Uchida
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 word Main in a TextField. &g

FuzzyQuery

2019-06-07 Thread Baris Kazar
Hi,- i cant get FuzzyQuery working for searching with a query like Mains~2 to find the word Main in a TextField. Any suggestions please? - To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands

Re: Lucene FuzzyQuery

2019-06-07 Thread baris . kazar
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 content

Re: Lucene FuzzyQuery

2019-06-07 Thread baris . kazar
They only differ in 1 char and 5 letters long one 4 letters long the correct word: Mains vs Main (correct) FuzzyQuery Mains~2 cannot catch anything with Main in the first 74 hits. the 75th hit has Main word. Best regards On 6/7/19 2:44 PM, Atri Sharma wrote: i make sure i specify a

Re: Lucene FuzzyQuery

2019-06-07 Thread baris . kazar
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

Re: Lucene FuzzyQuery

2019-06-07 Thread Atri Sharma
>However, with MUST > clause, that restriction is lifted. I meant that with a SHOULD clause, that restriction is lifted i.e. a query can score hits even if SHOULD clause does not match the hit (but other MUST clauses do match).

Re: Lucene FuzzyQuery

2019-06-07 Thread Atri Sharma
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

Lucene FuzzyQuery

2019-06-07 Thread baris . kazar
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

Re: FuzzyQuery on entire set of terms

2016-10-21 Thread Michael McCandless
You mean the total number of edits between those strings must be <= 2? If so, you must index the entire "Lucene Apache Group" as a single token, and likewise do a FuzzyQuery with the entire "Luceni Apachi Group", etc. If instead you do tokenize and use BooleanQuery to

FuzzyQuery on entire set of terms

2016-10-21 Thread Michael Wilkowski
Hi, I need to implement a function that performs fuzzy search on multiple terms in the way that a summarized distance 2 from ALL terms is allowed. For example query: Lucene Apache Group with maximum distance 2 should match: Luceni Apachi Group Lucen Apache Group Luce Apache Group but not: Luce

Re: Controlling FuzzyQuery edit type

2014-09-29 Thread Manuel Le Normand
Nevermind, I just wrote a custom function that outputs the edit type for each word. Thanks

Controlling FuzzyQuery edit type

2014-09-28 Thread Manuel Le Normand
Hello, In the FuzzyQuery I see it is possible to control the char transposition option by a boolean (which btw seems hardcoded and not configurable ). Is it possible to control the other edit types (char insertion, deletion or substitution) that are allowed somewhere in the code? Thanks, Manuel

Re: FuzzyQuery with short words

2013-09-12 Thread Michael McCandless
oc update. Again, apologies to all if I missed this > point in the documentation. > > Best, > > Tim > > -Original Message- > From: Michael McCandless [mailto:luc...@mikemccandless.com] > Sent: Thursday, September 12, 2013 7:19 AM > To: Lucene Users > Subje

RE: FuzzyQuery with short words

2013-09-12 Thread Allison, Timothy B.
] Sent: Thursday, September 12, 2013 7:19 AM To: Lucene Users Subject: Re: FuzzyQuery with short words I think so? The default prefixLength is 0 ... Just make sure you're not hitting the maxExpansions limit (default is 50). Ie, if your index has many other terms within edit distance 2 o

Re: FuzzyQuery with short words

2013-09-12 Thread Michael McCandless
t; to rank below the top 50, and be pruned. Mike McCandless http://blog.mikemccandless.com On Wed, Sep 11, 2013 at 9:42 PM, Allison, Timothy B. wrote: > All, > Apologies if I missed this in the documentation, but should: > > FuzzyQuery q = new FuzzyQuery(new Term("field",

FuzzyQuery with short words

2013-09-11 Thread Allison, Timothy B.
All, Apologies if I missed this in the documentation, but should: FuzzyQuery q = new FuzzyQuery(new Term("field", "ab"), 2) retrieve a document that contains: abcd and vice versa. Same question for: xy~1 and a document that contains "x". Will submit test case i

In Lucene 4.1 FuzzyQuery constructor now takes parameter maxEdits instead of parameter minSimilarity

2013-02-26 Thread Paul Taylor
FuzzyQuery constructor now takes parameter maxEdits instead of parameter minSimilarity. But I'm unclear how to map from the old value to the new value or whether they are unrelated and can no longer be compared. I was previously using a minsimilarity of 0.5f thanks

Re: Questions about FuzzyQuery in Lucene 4.x

2013-01-31 Thread Michael McCandless
icky, eg see how FuzzyQuery sets the per-term score in FuzzyTermsEnum using BoostAttribute. Rob's answer (on that stackoverflow question) is a nice solution, since it make a single Automaton matching the right (fuzzy + prefix) terms ... maybe you could make your own TermsEnum that somehow finds

Re: Questions about FuzzyQuery in Lucene 4.x

2013-01-31 Thread George Kelvin
Hi Jack, sorry for confusing you. I understand that it would be great if a minimal data set can be provided to repro the problem. But I was unable to do that.. Hi Michael, Thank you! That is the problem! I changed the maxExpansions to 100 and the results are found. About my second question, the

Re: Questions about FuzzyQuery in Lucene 4.x

2013-01-30 Thread Michael McCandless
On Tue, Jan 29, 2013 at 2:43 PM, George Kelvin wrote: > Hi Jack, > > The problematic query is "scar"+"wads". > > There are several (more than 10) documents in the data with the content > "star wars", so I think that query should be able to find all these > documents. > > I was trying to provide a

Re: Questions about FuzzyQuery in Lucene 4.x

2013-01-29 Thread Jack Krupansky
- and unable to help you any further. -- Jack Krupansky -Original Message- From: George Kelvin Sent: Tuesday, January 29, 2013 2:43 PM To: java-user@lucene.apache.org Subject: Re: Questions about FuzzyQuery in Lucene 4.x Hi Jack, The problematic query is "scar"+"wads&

Re: Questions about FuzzyQuery in Lucene 4.x

2013-01-29 Thread George Kelvin
gt; -Original Message- From: George Kelvin > Sent: Tuesday, January 29, 2013 12:28 PM > > To: java-user@lucene.apache.org > Subject: Re: Questions about FuzzyQuery in Lucene 4.x > > Hi Jack, > > ed is set to 1 here and I have lowercased all the data and queries. > > R

Re: Questions about FuzzyQuery in Lucene 4.x

2013-01-29 Thread Jack Krupansky
t data and the query - all the literals. In other words, construct a minimal test case that shows the failure. -- Jack Krupansky -Original Message- From: George Kelvin Sent: Tuesday, January 29, 2013 12:28 PM To: java-user@lucene.apache.org Subject: Re: Questions about FuzzyQuery in

Re: Questions about FuzzyQuery in Lucene 4.x

2013-01-29 Thread George Kelvin
. > > Another factor to take into consideration is that a case change ("Star" > vs. "star") also counts as an edit. > > -- Jack Krupansky > > -Original Message- From: George Kelvin > Sent: Tuesday, January 29, 2013 11:49 AM > To: java-user@lu

Re: Questions about FuzzyQuery in Lucene 4.x

2013-01-29 Thread Jack Krupansky
9, 2013 11:49 AM To: java-user@lucene.apache.org Subject: Re: Questions about FuzzyQuery in Lucene 4.x Hi Jack, Thanks for your reply! I don't think I passed the prefixLength parameter in. Here is the code I used to build the FuzzyQuery: String[] words = str.split("\\

Re: Questions about FuzzyQuery in Lucene 4.x

2013-01-28 Thread Jack Krupansky
Let's see your code that calls FuzzyQuery . If you happen to pass a prefixLength (3rd parameter) of 3 or more, then "ster" would not match "star" (but prefixLength of 2 would match). -- Jack Krupansky -Original Message- From: George Kelvin Sent: Monday, Ja

Re: FuzzyQuery in lucene 4.0

2013-01-09 Thread Jack Krupansky
FWIW, new FuzzyQuery(term, 2 ,0) is the same as new FuzzyQuery(term), given the current values of defaultMaxEdits (2) and defaultPrefixLength (0). -- Jack Krupansky -Original Message- From: Ian Lea Sent: Wednesday, January 09, 2013 9:44 AM To: java-user@lucene.apache.org Subject: Re

Re: FuzzyQuery in lucene 4.0

2013-01-09 Thread Ian Lea
See the javadocs for FuzzyQuery to see what the parameters are. I can't tell you what the comment means. Possible values to try maybe? -- Ian. On Wed, Jan 9, 2013 at 2:34 PM, algebra wrote: > is true Ian, o code is good. > > The only thing that I dont understand is a line: &

Re: FuzzyQuery in lucene 4.0

2013-01-09 Thread algebra
is true Ian, o code is good. The only thing that I dont understand is a line: Query query = new FuzzyQuery(term, 2 ,0); //0-2 Whats means 0 to 2? -- View this message in context: http://lucene.472066.n3.nabble.com/FuzzyQuery-in-lucene-4-0-tp4031871p4031879.html Sent from the Lucene - Java

Re: FuzzyQuery in lucene 4.0

2013-01-09 Thread Ian Lea
oc.add(new Field("fieldname", list.get(i), Field.Store.YES, > Field.Index.ANALYZED)); > iwriter.addDocument(doc); > } > > iwriter.close(); > > IndexReader reader = IndexReader.open(directory); > IndexSearcher isearcher = new IndexSearcher(rea

FuzzyQuery in lucene 4.0

2013-01-09 Thread algebra
er.addDocument(doc); } iwriter.close(); IndexReader reader = IndexReader.open(directory); IndexSearcher isearcher = new IndexSearcher(reader); Term term = new Term("fieldname", s); Query query = new FuzzyQuery(term, 1,0);// 0-2 To

FuzzyQuery minimumSimilarity

2012-11-05 Thread Damian Birchler
Hi there Lucene calucaltes the string similarity between two strings s1 and s2 according to the formula Similarity = Levenshtein-Distance(s1,s2)/min(Length(s1),Length(s2)) I would have thought Lucene would divide by the length of the longer string. In particular, the above formula could - in m

Re: Use an analyzer with Term, FuzzyQuery, BooleanQuery and friends

2012-08-27 Thread Jack Krupansky
@lucene.apache.org Subject: Use an analyzer with Term, FuzzyQuery, BooleanQuery and friends Hello list I build my queries programmatically with Term, NumericTerm, FuzzyQuery, BooleanQuery etc. In particular, I do not use QueryParser to build my query from a string. Still, I would like to

Use an analyzer with Term, FuzzyQuery, BooleanQuery and friends

2012-08-27 Thread Damian Birchler
Hello list I build my queries programmatically with Term, NumericTerm, FuzzyQuery, BooleanQuery etc. In particular, I do not use QueryParser to build my query from a string. Still, I would like to first run the values for my terms through an analzyer (more precisely, the same analyzer that I

Re: combining MultiFieldQueryParserparser with FuzzyQuery

2010-10-19 Thread Ian Lea
I don't think you can do that directly with MultiFieldQueryParser, but as Erick said in a similar thread a short while ago "You can create your own BooleanQuery and just add clauses as you need to". FuzzyQuery fq1 = new FuzzyQuery(whatever ...); FuzzyQuery fq2 = new FuzzyQuer

combining MultiFieldQueryParserparser with FuzzyQuery

2010-10-18 Thread Andy Yang
I would like to use MultiFieldQueryParser to serach multiple fields, then in each field, I want to use fuzzy search. How can that be done? Any example will be appreciated. Thanks, Andy

RE: Combining PrefixQuery and FuzzyQuery

2010-04-19 Thread Uwe Schindler
_1/api/all/org/apache/lucene/search/FuzzyQuery.html#FuzzyQuery(org.apache.lucene.index.Term, float, int) e.g. new FuzzyQuery(new Term("item.name","thesuffix"), 0.79, 3) This will match all terms starting with "the" (prefix length 3) and will apply a fuzzy to the rest (

Re: Combining PrefixQuery and FuzzyQuery

2010-04-19 Thread Lukas Österreicher
hrieb "Uwe Schindler" unter : > Dont use PrefixQuery, only FuzzyQuery. There you pass in the whole term (with > prefix) and define how many characters are the prefix. > > - > Uwe Schindler > H.-H.-Meier-Allee 63, D-28213 Bremen > http://www.thetaphi.de >

Re: Combining PrefixQuery and FuzzyQuery

2010-04-19 Thread Lukas Österreicher
de to this: BooleanQuery bQuery = new BooleanQuery(); FuzzyQuery fuzzyPrefixQuery = new FuzzyQuery(new Term("item.name", termText + "*"), 0.79f); bQuery.add(fuzzyPrefixQuery , Occur.MUST); Lukas Am 19.04.10 17:13 schrieb "Uwe Schindler" unter : > Dont use PrefixQuery, only F

RE: Combining PrefixQuery and FuzzyQuery

2010-04-19 Thread Uwe Schindler
Dont use PrefixQuery, only FuzzyQuery. There you pass in the whole term (with prefix) and define how many characters are the prefix. - Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -Original Message- > From: Lukas Österr

Re: Combining PrefixQuery and FuzzyQuery

2010-04-19 Thread Lukas Österreicher
//www.thetaphi.de > eMail: u...@thetaphi.de > > >> -Original Message- >> From: Lukas Österreicher [mailto:lukas.oesterreic...@austria.real.com] >> Sent: Monday, April 19, 2010 4:43 PM >> To: java-user@lucene.apache.org >> Subject: Combining PrefixQuery and Fu

RE: Combining PrefixQuery and FuzzyQuery

2010-04-19 Thread Uwe Schindler
April 19, 2010 4:43 PM > To: java-user@lucene.apache.org > Subject: Combining PrefixQuery and FuzzyQuery > > Hello. > > Is it possible to combine PrefixQuery and FuzzyQuery? > The search on a term should both be fuzzy but also match with results > that > jut begin wit

Combining PrefixQuery and FuzzyQuery

2010-04-19 Thread Lukas Österreicher
Hello. Is it possible to combine PrefixQuery and FuzzyQuery? The search on a term should both be fuzzy but also match with results that jut begin with that token (or an approximation of that token). If it is possible, can you give me an example on how to achieve this? Currently I only use the

RE: Strange Fuzzyquery results scoring when using a low minimal distance

2010-02-23 Thread stefcl
hat terms with > lower docFreq get a higher score in TermQuery. This score overweighs the > boosting done by FuzzyQuery (because you index is so small). > > If you raise the minSimilarity a little bit, your query matches less terms > and the rewritten BooleanQuery contains less clauses. A

RE: Strange Fuzzyquery results scoring when using a low minimal distance

2010-02-16 Thread Uwe Schindler
The problem ist he following: The docFreq of the term "lucéne" is 2, all other terms have 1 (because StandardAnalyzer lowercases everything). What happens is, that terms with lower docFreq get a higher score in TermQuery. This score overweighs the boosting done by FuzzyQuery (because

Re: Strange Fuzzyquery results scoring when using a low minimal distance

2010-02-16 Thread stefcl
> From: stefcl > To: java-user@lucene.apache.org > Sent: Mon, 15 February, 2010 14:13:52 > Subject: Strange Fuzzyquery results scoring when using a low minimal > distance > > > Hello, > > I'm using Lucene v3. > Please consider the following spellings

Re: Strange Fuzzyquery results scoring when using a low minimal distance

2010-02-15 Thread mark harwood
to return FuzzyLikeThisQuery (found in "contrib/queries") Cheers Mark - Original Message From: stefcl To: java-user@lucene.apache.org Sent: Mon, 15 February, 2010 14:13:52 Subject: Strange Fuzzyquery results scoring when using a low minimal distance Hello, I'm using Lucene

Strange Fuzzyquery results scoring when using a low minimal distance

2010-02-15 Thread stefcl
Hello, I'm using Lucene v3. Please consider the following spellings Lucene Lucéne lucéne Lucane Lucen When searching for "lucéne" among those words using a FuzzyQuery (with 0.5 edit distance), results show : 1. Lucene 1.0259752 2. Lucane 1.0259752 3. Lucéne 0.95660806 4. lucé

Re: FuzzyQuery - rounding bug?

2007-12-17 Thread Erick Erickson
> how to i use lucene search to serach files of the local system > > On Dec 17, 2007 2:11 PM, Helmut Jarausch <[EMAIL PROTECTED]> > wrote: > > > Hi, > > > > according to the LiA book the FuzzyQuery distance is computed as > > > > 1- distance

RE: FuzzyQuery + QueryParser - I'm puzzled

2007-12-17 Thread Steven A Rowe
> > > > > Hi, > > > > > > please help I am totally puzzled. > > > > > > The same query, once with a direct call to FuzzyQuery > > > succeeds while the same query with QueryParser fails. > > > > > > What am

Re: FuzzyQuery - prefixLength - use with QueryParser?

2007-12-17 Thread Erik Hatcher
On Dec 17, 2007, at 3:31 AM, Helmut Jarausch wrote: FuzzyQuery (in the 2.2.0 API) may take 3 arguments, term , minimumSimilarity and prefixLength Is there any syntax to specify the 3rd argument in a query term for QueryParser? (I haven't found any the current docs) No, there isn't

Re: FuzzyQuery + QueryParser - I'm puzzled

2007-12-17 Thread anjana m
I am totally puzzled. > > > > The same query, once with a direct call to FuzzyQuery > > succeeds while the same query with QueryParser fails. > > > > What am I missing? > > > > Sorry, I'm using pylucene (with lucene-java-2.2.0-603782) > > > &g

Re: FuzzyQuery + QueryParser - I'm puzzled

2007-12-17 Thread Doron Cohen
See in Lucene FAQ: "Are Wildcard, Prefix, and Fuzzy queries case sensitive?" On Dec 17, 2007 11:27 AM, Helmut Jarausch <[EMAIL PROTECTED]> wrote: > Hi, > > please help I am totally puzzled. > > The same query, once with a direct call to FuzzyQuery >

Re: FuzzyQuery - rounding bug?

2007-12-17 Thread anjana m
how to i use lucene search to serach files of the local system On Dec 17, 2007 2:11 PM, Helmut Jarausch <[EMAIL PROTECTED]> wrote: > Hi, > > according to the LiA book the FuzzyQuery distance is computed as > > 1- distance / min(textlen,targetlen) > > Given > def

FuzzyQuery + QueryParser - I'm puzzled

2007-12-17 Thread Helmut Jarausch
Hi, please help I am totally puzzled. The same query, once with a direct call to FuzzyQuery succeeds while the same query with QueryParser fails. What am I missing? Sorry, I'm using pylucene (with lucene-java-2.2.0-603782) #!/usr/bin/python import lucene from lucene import * lucene.i

FuzzyQuery - rounding bug?

2007-12-17 Thread Helmut Jarausch
Hi, according to the LiA book the FuzzyQuery distance is computed as 1- distance / min(textlen,targetlen) Given def addDoc(text, writer): doc = Document() doc.add(Field("field", text, Field.Store.YES, Field.Index.TOKENIZED)) writer.addDocument(doc)

FuzzyQuery - prefixLength - use with QueryParser?

2007-12-17 Thread Helmut Jarausch
Hi, FuzzyQuery (in the 2.2.0 API) may take 3 arguments, term , minimumSimilarity and prefixLength Is there any syntax to specify the 3rd argument in a query term for QueryParser? (I haven't found any the current docs) Many thanks for a hint, Helmut Jarausch Lehrstuhl fuer Numer

FuzzyQuery using termDocs() for context filtering

2007-11-05 Thread Timo Nentwig
Hi! Imagine an index holding documents in different languages and country. Language+country is what I call a context and I build and hold a QueryFilter for each context. When performing a fuzzy search, FilteredTermEnum doesn't care about any contexts at all (well, how should it :). It builds a

Re: How to make a case insensitive search using a FuzzyQuery?

2007-07-06 Thread Chris Hostetter
: A possible solution is store in a document object two fields: the original : and the lowercased. I use the last one to make the query, and the other one : to show the results. It works, but it doesnt smell good! if your analyzer is what does hte lowercasing then you don't need two seperate fi

Re: How to make a case insensitive search using a FuzzyQuery?

2007-07-06 Thread Eloi Rocha Neto
nd the other > one > to show the results. It works, but it doesnt smell good! > > Thanks for your help! > > Eloi > > > On 7/6/07, Daniel Noll <[EMAIL PROTECTED]> wrote: > > > > On Friday 06 July 2007 11:39:00 Eloi Rocha Neto wrote: > > > Hi, &g

Re: How to make a case insensitive search using a FuzzyQuery?

2007-07-06 Thread Erick Erickson
, but it doesnt smell good! Thanks for your help! Eloi On 7/6/07, Daniel Noll <[EMAIL PROTECTED]> wrote: > > On Friday 06 July 2007 11:39:00 Eloi Rocha Neto wrote: > > Hi, > > > >Anyone knows how to make a case insensitive search using a > FuzzyQuery? > &g

Re: How to make a case insensitive search using a FuzzyQuery?

2007-07-06 Thread Jiye Yu
o show the results. It works, but it doesnt smell good! Thanks for your help! Eloi On 7/6/07, Daniel Noll <[EMAIL PROTECTED]> wrote: On Friday 06 July 2007 11:39:00 Eloi Rocha Neto wrote: > Hi, > >Anyone knows how to make a case insensitive search using a FuzzyQuery? >

Re: How to make a case insensitive search using a FuzzyQuery?

2007-07-06 Thread Eloi Rocha Neto
07 11:39:00 Eloi Rocha Neto wrote: > Hi, > >Anyone knows how to make a case insensitive search using a FuzzyQuery? > >I want that the results coming from "PP-Trip SubAlcance Seq Negativa", > "pp-trip subAlcance seq negativa" and "PP-TRIP SUBALCANCE SE

Re: How to make a case insensitive search using a FuzzyQuery?

2007-07-05 Thread Daniel Noll
On Friday 06 July 2007 11:39:00 Eloi Rocha Neto wrote: > Hi, > >Anyone knows how to make a case insensitive search using a FuzzyQuery? > >I want that the results coming from "PP-Trip SubAlcance Seq Negativa", > "pp-trip subAlcance seq negativa" an

How to make a case insensitive search using a FuzzyQuery?

2007-07-05 Thread Eloi Rocha Neto
Hi, Anyone knows how to make a case insensitive search using a FuzzyQuery? I want that the results coming from "PP-Trip SubAlcance Seq Negativa", "pp-trip subAlcance seq negativa" and "PP-TRIP SUBALCANCE SEQ NEGATIVA" be the same. The field must be inde

Doubt in FuzzyQuery

2007-05-08 Thread sccarrera
Last week I send a message with a doubt in a FuzzyQuery. I am working with Lucene 2.1.0. I would like to recover files including the set of strings "société américaine" and "sociétés américaines" from a fuzzy query relating the string "société américain" I crea

  1   2   >