You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Seid Mohammed <se...@gmail.com> on 2009/02/19 14:29:48 UTC
searching a sentence or paragraph
from lucen index, how can we search a sentence or a paragraph which
satisfy our query?
thanks a lot
seid m
--
"RABI ZIDNI ILMA"
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: searching a sentence or paragraph
Posted by Grant Ingersoll <gs...@apache.org>.
I'm not sure why using a PhraseQuery allows you to search within a
sentence. PhraseQuery just makes sure that the terms appear next to
each other (or within some slop), but it isn't aware of sentence or
paragraph boundaries.
See http://www.lucidimagination.com/search/document/6a5dfb8df2ce651b/sentence_boundary_storage
On Feb 19, 2009, at 9:18 AM, Seid Mohammed wrote:
> Thanks Nada,
> it again works perfectly
>
> seid m.
>
> On 2/19/09, Nada Mimouni <mi...@tk.informatik.tu-darmstadt.de>
> wrote:
>>
>>
>>
>> You need to create a TermQuery or PhraseQuery with terms in your
>> query
>> depending on what result you need exactly.
>>
>> To create PhraseQuery, try the built-in phrase processing with double
>> quotes, e.g.
>> "this is a phrase".
>>
>> See the Term section at
>> http://lucene.apache.org/java/2_4_0/queryparsersyntax.html
>>
>> You can also have a look at
>> http://www.lucidimagination.com/Community/Hear-from-the-Experts/Articles/Getting-Started-with-Lucene/
>>
>> Best
>> Nada
>>
>>
>> -----Original Message-----
>> From: Seid Mohammed [mailto:seidymam@gmail.com]
>> Sent: Thu 2/19/2009 2:29 PM
>> To: java-user@lucene.apache.org
>> Subject: searching a sentence or paragraph
>>
>> from lucen index, how can we search a sentence or a paragraph which
>> satisfy our query?
>>
>> thanks a lot
>> seid m
>> --
>> "RABI ZIDNI ILMA"
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>>
>>
>
>
> --
> "RABI ZIDNI ILMA"
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
--------------------------
Grant Ingersoll
http://www.lucidimagination.com/
Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids)
using Solr/Lucene:
http://www.lucidimagination.com/search
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: searching a sentence or paragraph
Posted by Seid Mohammed <se...@gmail.com>.
Thanks Nada,
it again works perfectly
seid m.
On 2/19/09, Nada Mimouni <mi...@tk.informatik.tu-darmstadt.de> wrote:
>
>
>
> You need to create a TermQuery or PhraseQuery with terms in your query
> depending on what result you need exactly.
>
> To create PhraseQuery, try the built-in phrase processing with double
> quotes, e.g.
> "this is a phrase".
>
> See the Term section at
> http://lucene.apache.org/java/2_4_0/queryparsersyntax.html
>
> You can also have a look at
> http://www.lucidimagination.com/Community/Hear-from-the-Experts/Articles/Getting-Started-with-Lucene/
>
> Best
> Nada
>
>
> -----Original Message-----
> From: Seid Mohammed [mailto:seidymam@gmail.com]
> Sent: Thu 2/19/2009 2:29 PM
> To: java-user@lucene.apache.org
> Subject: searching a sentence or paragraph
>
> from lucen index, how can we search a sentence or a paragraph which
> satisfy our query?
>
> thanks a lot
> seid m
> --
> "RABI ZIDNI ILMA"
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
>
>
--
"RABI ZIDNI ILMA"
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
RE: searching a sentence or paragraph
Posted by Nada Mimouni <mi...@tk.informatik.tu-darmstadt.de>.
You need to create a TermQuery or PhraseQuery with terms in your query depending on what result you need exactly.
To create PhraseQuery, try the built-in phrase processing with double quotes, e.g.
"this is a phrase".
See the Term section at
http://lucene.apache.org/java/2_4_0/queryparsersyntax.html
You can also have a look at http://www.lucidimagination.com/Community/Hear-from-the-Experts/Articles/Getting-Started-with-Lucene/
Best
Nada
-----Original Message-----
From: Seid Mohammed [mailto:seidymam@gmail.com]
Sent: Thu 2/19/2009 2:29 PM
To: java-user@lucene.apache.org
Subject: searching a sentence or paragraph
from lucen index, how can we search a sentence or a paragraph which
satisfy our query?
thanks a lot
seid m
--
"RABI ZIDNI ILMA"
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org