Re: Exact Match Query in Lucene with SnowBall Analyzer

2012-05-09 Thread Jan Høydahl
Hi, The behavior is expected with stemming. Have you tried using StandardAnalyzer which do not do stemming? -- Jan Høydahl, search solution architect Cominvent AS - www.cominvent.com Solr Training - www.solrtraining.com On 9. mai 2012, at 08:12, Yogesh patel wrote: > I am using Lucene and i hav

Re: Exact match with fuzzy query

2010-06-12 Thread Ahmet Arslan
> > Yes bauer~0.8 bauer as query will bring you both exact > and fuzzy matches. > > Is this the normal way to do it? Somehow. 'bauer~0.8 OR bauer' is easiest way to fuzzy search which also finds exact matches. > Unfortunately this parser seems to be missing in 3.0.1 http://lucene.apache.org/

Re: Exact match with fuzzy query

2010-06-12 Thread Markus Mehrwald
Am 12.06.2010 13:57, schrieb Ahmet Arslan: I am using lucene 3.0.1. I use a MultiFieldQueryParser with a GermanAnalyzer. In my index are some values among others one document with the title "bauer". I append to every word in my query a ~0.8 (here I am not sure if this is the way to do it). If I

Re: Exact match with fuzzy query

2010-06-12 Thread Ahmet Arslan
> I am using lucene 3.0.1. I use a MultiFieldQueryParser with > a GermanAnalyzer. In my index are some values among others > one document with the title "bauer". I append to every word > in my query a ~0.8 (here I am not sure if this is the way to > do it). If I try to search now, I will not get th

Re: Exact match on entire field

2009-05-06 Thread Karl Wettin
You should probably tell us the reason to why you need this functionallity. Given you only load the stored comparative field for the first it doesn't really have to be that expensive. If you know that the first hit was not a perfect match then you know that any matching documents with a l

Re: Exact match on entire field

2009-05-06 Thread Erick Erickson
how much data are you talking about here? Could you use a KeywordAnalyzer (perhaps in a duplicated field) with appropriate filtering (to lowercase, remove punctuation, etc)? Best Erick On Wed, May 6, 2009 at 4:50 AM, Laura Hollink wrote: > Hi, > > I am trying to distinguish between a document t

Re: Exact match query on a field in index which has been indexed using StandardAnalyzer

2008-05-15 Thread Karl Wettin
14 maj 2008 kl. 17.30 skrev Erick Erickson: Another possibility would be to introduce marker tokens in your field, index something like "$ member of technical staff $" and then, when querying for exact matches, *add* the $ tokens to the beginning and end of the query. Just a note, I've hit pro

Re: Exact match query on a field in index which has been indexed using StandardAnalyzer

2008-05-14 Thread Erick Erickson
Keeping a duplicate field is certainly one way to go, and assuming that it's just the title the duplicate field probably won't increase your index much. I'd recommend just giving it a try, it probably costs less resource wise than you think. You'll have to do something like this to get things to w

Re: Exact match query on a field in index which has been indexed using StandardAnalyzer

2008-05-13 Thread Gauri Shankar
Thanks Erick... My index size is ~2 GB. Is it a good idea to keep another duplicate field as UN_TOKENIZED and search using KeywordAnalyzer? Few points: 1. when I say exact match then I mean the exact phrase match only. That implies the query should not match a document with the field value "Memb

Re: Exact match query on a field in index which has been indexed using StandardAnalyzer

2008-05-13 Thread Erick Erickson
First, why do you OR together the different cases? Assuming you're pushing your query through StandardAnalyzer, it'll lowercase for you (just as it did during indexing). But to your question. Would you expect your query to match a document with the field value "Member of Technical Staff for Accoun

Re: Exact match on a single term / word

2006-06-28 Thread Chris Hostetter
: I am trying to get Lucene to perform an exact match on a single term or word : using the default query parser. It works fine whenever I have more than one : word / term in the search string (it parses the string into a PhraseQuery : with a slop of 0 which is correct). However when the search str

Re: Exact match on a single term / word

2006-06-28 Thread Erik Hatcher
What is the problem with using a TermQuery in this case? Please provide some more details on the analyzer you're using (both for indexing and with QueryParser) and a sample of text you indexed. Erik On Apr 28, 2006, at 7:36 AM, Hugh Ross wrote: I am trying to get Lucene to perform

Re: Exact Match Searches and Stop Words

2006-06-20 Thread Steven Rowe
Hugh Ross wrote: The problem is that the standard analyzer removes the stop word (i.e. "of") before indexing and searching. Is there an workaround for this? See my response to a similar question here: In

Re: exact match ..

2006-02-21 Thread Robert Watkins
The way I have solved the problem of allowing exact matches is, for each field in which it is possible for an exact match to be requested, a parallel field is created at index time that is unstemmed and has a specific prefix: if (fieldData.isSearched() && tokenize && usingStemmingAnalyzer

Re: exact match ..

2006-02-20 Thread Erik Hatcher
On Feb 20, 2006, at 1:22 PM, Mufaddal Khumri wrote: Just realized that the various fields I have are part of the same document. But in order to leverage the KeywordAnalyzer, I would have to now have two sets of document. One document with the fields: title, content <--- analyzed by custom a

Re: exact match ..

2006-02-20 Thread Erik Hatcher
On Feb 20, 2006, at 1:02 PM, Mufaddal Khumri wrote: If I understand you right, I could use something like the Keyword analyzer to tokenize the entire stream as a single token and store that in the index. I could definitely the keyword analyzer while indexing this particular field "categoryN

Re: exact match ..

2006-02-20 Thread Mufaddal Khumri
Hi, Just realized that the various fields I have are part of the same document. But in order to leverage the KeywordAnalyzer, I would have to now have two sets of document. One document with the fields: title, content <--- analyzed by custom analyzer Other document with the fields: categoryNam

Re: exact match ..

2006-02-20 Thread Mufaddal Khumri
Hi Steve, If I understand you right, I could use something like the Keyword analyzer to tokenize the entire stream as a single token and store that in the index. I could definitely the keyword analyzer while indexing this particular field "categoryNames". Now my questions is on how to search

Re: exact match ..

2006-02-20 Thread Steven Rowe
Mufaddal Khumri wrote: lets say i do this while indexing: doc.add(Field.Text("categoryNames", categoryNames)); Now while searching categoryNames, I do a search for "digital cameras". I only want to match the exact phrase digital cameras with documents who have exactly the phrase "digital came

Re: exact match

2005-04-04 Thread Erik Hatcher
On Apr 4, 2005, at 4:34 PM, Yura Smolsky wrote: Hello, java-user. I have documents with tokenized, indexes and stored field. This field contain one-two words usually. I need to be able to search exact matches for two words. For example search "John" should return documents with field containing "Jo