FAQ
Hello :)

I'm wondering which Analyzer would be the best to query exact value for
a property. I read the javadoc and it it said that when a document is
indexed, I could use the Field.Index.NOT_ANALYZED to store the value as
is and then I would be able to query for it. But in the same time, I
need to provide an analyzer for the indexWriter constructor and for my
queries.

Is it possible to specify that no analyzer should be used for both
indexing and querying ?

If not, which analyzer would be the best choice?

Thanks for the help :)
Regards.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org

Search Discussions

  • Bmdakshinamurthy at May 30, 2011 at 3:25 pm
    I think you are looking for a keyword analyzer.
    http://lucene.apache.org/java/3_0_2/api/core/org/apache/lucene/analysis/KeywordAnalyzer.html
    On Mon, May 30, 2011 at 8:48 PM, G.Long wrote:

    Hello :)

    I'm wondering which Analyzer would be the best to query exact value for a
    property. I read the javadoc and it it said that when a document is indexed,
    I could use the Field.Index.NOT_ANALYZED to store the value as is and then I
    would be able to query for it. But in the same time, I need to provide an
    analyzer for the indexWriter constructor and for my queries.

    Is it possible to specify that no analyzer should be used for both indexing
    and querying ?

    If not, which analyzer would be the best choice?

    Thanks for the help :)
    Regards.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org

    --
    Thanks and Regards,
    DakshinaMurthy BM
  • G.Long at May 31, 2011 at 8:02 am
    Thank you :)

    It seems to work as I wanted to. Now If I want to index content to do
    full-text search, would it be better to choose a standardAnalyzer or a
    more specific one like EnglishAnalyzer or FrenchAnalyzer (assuming the
    content I want to index is only in english or only in french) ?

    Regards,

    Le 30/05/2011 17:25, bmdakshinamurthy@gmail.com a écrit :
    I think you are looking for a keyword analyzer.
    http://lucene.apache.org/java/3_0_2/api/core/org/apache/lucene/analysis/KeywordAnalyzer.html

    On Mon, May 30, 2011 at 8:48 PM, G.Longwrote:
    Hello :)

    I'm wondering which Analyzer would be the best to query exact value for a
    property. I read the javadoc and it it said that when a document is indexed,
    I could use the Field.Index.NOT_ANALYZED to store the value as is and then I
    would be able to query for it. But in the same time, I need to provide an
    analyzer for the indexWriter constructor and for my queries.

    Is it possible to specify that no analyzer should be used for both indexing
    and querying ?

    If not, which analyzer would be the best choice?

    Thanks for the help :)
    Regards.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Bmdakshinamurthy at May 31, 2011 at 10:24 am
    I am not very sure about a language specific analyzer. French language has
    words seperated by an apostrophe. The standard analyzer does not tokenize
    words on an apostrophe. Then there is the case of accented letters. It
    depends on how you want to handle these. Are you going to store them as is
    or convert them to their acsii equivalents? May be somebody else could throw
    some light on this.
    On Tue, May 31, 2011 at 1:32 PM, G.Long wrote:

    Thank you :)

    It seems to work as I wanted to. Now If I want to index content to do
    full-text search, would it be better to choose a standardAnalyzer or a more
    specific one like EnglishAnalyzer or FrenchAnalyzer (assuming the content I
    want to index is only in english or only in french) ?

    Regards,

    Le 30/05/2011 17:25, bmdakshinamurthy@gmail.com a écrit :

    I think you are looking for a keyword analyzer.
    http://lucene.apache.org/java/3_0_2/api/core/org/apache/lucene/analysis/KeywordAnalyzer.html

    On Mon, May 30, 2011 at 8:48 PM, G.Longwrote:

    Hello :)
    I'm wondering which Analyzer would be the best to query exact value for a
    property. I read the javadoc and it it said that when a document is
    indexed,
    I could use the Field.Index.NOT_ANALYZED to store the value as is and
    then I
    would be able to query for it. But in the same time, I need to provide an
    analyzer for the indexWriter constructor and for my queries.

    Is it possible to specify that no analyzer should be used for both
    indexing
    and querying ?

    If not, which analyzer would be the best choice?

    Thanks for the help :)
    Regards.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org

    --
    Thanks and Regards,
    DakshinaMurthy BM

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedMay 30, '11 at 3:19p
activeMay 31, '11 at 10:24a
posts4
users2
websitelucene.apache.org

2 users in discussion

G.Long: 2 posts Bmdakshinamurthy: 2 posts

People

Translate

site design / logo © 2022 Grokbase