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
@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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
17 matches
Mail list logo