RE: Problem searching in the same sentence

2010-09-30 Thread Sirish Vadala
I have tried the below code: Field field = new Field(fieldName, validFieldValue, (store) ? Field.Store.YES : Field.Store.NO, (tokenize) ? Field.Index.ANALYZED : Field.Index.NOT_ANALYZED, Field.TermVector.WITH_POSITIONS_OFFSETS); However, I still have the same problem. It

RE: Problem searching in the same sentence

2010-09-29 Thread Jagdish Vasani IN
@lucene.apache.org Subject: Re: Problem searching in the same sentence Hello All: I am performing the sentence specific phrase search, by adding sentence by sentence to the same field as suggested below. Everything works fine, but when I display my results, highlighter is not able to find the search text

Re: Problem searching in the same sentence

2010-09-29 Thread Sirish Vadala
Hello All: I am performing the sentence specific phrase search, by adding sentence by sentence to the same field as suggested below. Everything works fine, but when I display my results, highlighter is not able to find the search text phrase. The following is my code: SentenceScanner sentenceSc

Re: Problem searching in the same sentence

2010-09-16 Thread Simon Willnauer
Hi Sirish, see my comments inline... On Thu, Sep 16, 2010 at 7:39 PM, Sirish Vadala wrote: > > Hello All: > > Can any one suggest me the best way to allow me to perform a sentence > specific phrase search? > > Eg: Let the indexed text be: > > If you are posting a question, please try search firs

Re: Problem searching in the same sentence

2010-09-16 Thread anshum.gu...@naukri.com
Try with multi valued field while indexing i.e. Add each sentence as a separate field(with the same field name) to the same document. This would give you the results as you want. --Original Message-- From: Sirish Vadala To: java-user@lucene.apache.org ReplyTo: java-user@lucene.apache.org

Re: Problem searching field with % as value

2009-12-10 Thread kanayo
Hi, Thanks Ian for your reply. What i did was to put a check in my indexing such that when the stirng to index is just % it stores it un_analyzed else then analyze and i then use the TermQuery to search for it and it is now working. Thanks a lot for your tip. Cheers. Ian Lea wrote: > > If y

Re: Problem searching field with % as value

2009-12-08 Thread Ian Lea
If you store the field unanalyzed it will be indexed as is. You can then search for it via a TermQuery, or use QueryParser with PerFieldAnalyzerWrapper specifying KeywordAnalyzer for the field containing this character. Another approach is to replace the % with something easier to work with. You

Re: Problem searching field with % as value

2009-12-08 Thread kanayo
Thanks for your reply Erick. In Luke, its also not working. I tried to retrieving values from the field by specifying the field as the search field and then specify % as the search parameter which using StandardAnalyzer but nothing is displayed. Also while Luke shows the query details for other s

Re: Problem searching field with % as value

2009-12-08 Thread Erick Erickson
Try printing out query.toString() to see what's actually being sent to the searcher. You can try the same thing in Luke, specifying StandardAnalyzer to parse queries. Are you sure you're specifying the fields in the query and not just the '%'? That would go against your default field. When you s

Re: Problem searching non analyzed fields

2009-09-30 Thread Paul Taylor
Robert Muir wrote: try checking out PerFieldAnalyzerWrapper, so you can specify how each field is handled, i.e. some fields with KeywordAnalyzer, other fields with StandardAnalyzer, etc. Thanks, yes actually I realize these fields do need some analysis because I want to the search to be case ins

RE: Problem searching non analyzed fields

2009-09-29 Thread Uwe Schindler
Hallo, If you do not analyze fields during indexing, you cannot really use QueryParser on the search side (because the QueryParser itsself always analyzes the entered query string). If you added some fields using NOT_ANALYZED, just use a simple "new TermQuery(new Term(field, term))" to search for

Re: Problem searching non analyzed fields

2009-09-29 Thread Robert Muir
try checking out PerFieldAnalyzerWrapper, so you can specify how each field is handled, i.e. some fields with KeywordAnalyzer, other fields with StandardAnalyzer, etc. On Tue, Sep 29, 2009 at 6:16 PM, Paul Taylor wrote: > I use the same Analyzer for both creating an index and searching however

Re: Problem searching

2006-09-28 Thread James O'Rourke
Wow, thanks, just found a significant bug - thought I was using StandardAnalyzer throughout but was not!! ouch! Nasty typo. Thanks again. James On Sep 28, 2006, at 5:57 PM, Erick Erickson wrote: Sure, what analyzer are you using? Both for indexing and parsing the query? I'll bet that you

Re: Problem searching

2006-09-28 Thread Erick Erickson
Sure, what analyzer are you using? Both for indexing and parsing the query? I'll bet that you're using a tokenizer (in one or both) that breaks your input stream up in ways you're not expecting. Get a copy of luke (google lucene luke) if you haven't already and look at what's in your index. You c

Re: Problem : Searching with Lucene 2.0

2006-07-05 Thread yueyu lin
ile can be read doesn't help catch (FileNotFoundException fnfe) { //To be filled } } } } Need your help.. Regards Sam -Original Message- From: yueyu lin [mailto:[EMAIL PROTECTED] Sent: Thursday, July 06, 2006 11:39 AM To: java-user@lucene.apache.org Subject: Re: Pro

RE: Problem : Searching with Lucene 2.0

2006-07-05 Thread Sarvadnya Mutalik
CTED] Sent: Thursday, July 06, 2006 11:39 AM To: java-user@lucene.apache.org Subject: Re: Problem : Searching with Lucene 2.0 How you index "doctitle" and "summary". The Store parameter must be "COMPRESS" or "YES" On 7/6/06, Sarvadnya Mutalik <[EMAIL PROT

Re: Problem : Searching with Lucene 2.0

2006-07-05 Thread yueyu lin
How you index "doctitle" and "summary". The Store parameter must be "COMPRESS" or "YES" On 7/6/06, Sarvadnya Mutalik <[EMAIL PROTECTED]> wrote: Hi, I'm using Lucene 2.0, latest ver of Apache Lucene search engine. After successfully indexing, when I tried to search, I'm not able to get the compl