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 sog <so...@gmail.com> on 2006/03/02 03:52:27 UTC
sentences and paragraph search requirement
I am implement a search engine, I do some special search requirement:
Grammatical Connectors /s Search terms in the same sentence:
design /s defect
同一个句子
/p Search terms in the same paragraph:
hearsay /p utterance
同一个段落
+s The first term preceding the second within the same sentence:
palsgraf +s island
同一个句子,但有先后顺序
+p The first term preceding the second within the same paragraph:
ti(mikkelson +p mikkelson)
同一个段落,但有先后顺序
Note: When you want to specify that the same term appears at least
twice in a sentence or paragraph, use the +s or +p connector. For example,
the query ti(mikkelson +p mikkelson) retrieves documents in which the name
Mikkelson occurs twice in the title field.
I am not sure lucene support this kind of search expression, How can I ?
thx
sog
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: sentences and paragraph search requirement
Posted by Chris Hostetter <ho...@fucit.org>.
: Grammatical Connectors /s Search terms in the same sentence:
: /p Search terms in the same paragraph:
: +s The first term preceding the second within the same sentence:
: +p The first term preceding the second within the same paragraph:
: I am not sure lucene support this kind of search expression, How can I ?
As discussed in the past, if you inject artificial tokens denoting
the start/end of sentences and paragraphs, then you can use SpanQueries to
accomplish this. Search the list archives for "lucene span sentence" for
several of the past discussions.
-Hoss
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org