FAQ
Hi

Apologies up front if this question has been asked before.

I have a document which contains a field that stores an untokenized value such as TEST_TYPE. The analyser used is StandardAnalyzer and I pass the same analyzer into the query. I perform the following query : fieldName:TEST_*, however this does not return any results. Is this the expected behaviour? Can I use capital letters in my wildcard query or do i need to do some processing before passing it to the query parser?


Any help would be appreciated.

Thanks
Amin
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Search Discussions

  • Jack Krupansky at Jan 20, 2011 at 11:23 pm
    Wildcards only work for a single term. At index time the underscore in
    TEST_TYPE is treated as if it were a space separator, producing two terms.
    At query time the existence of the wildcard suppresses ALL analysis of the
    term (although that behavior may vary between query parsers), so that the
    underscore is kept at query time even though StandardAnalyzer (or
    WordDelimiterFilter or similar filter) would produce a text stream without
    any underscores.

    StandardAnalyzer lower cases its output, so there is no case sensitivity.
    But, if you happen to use upper case in a wildcard query term that query
    term will fail to match anything because the existence of the wildcard
    suppresses all analysis, including the lowercasing. Once again, different
    query parsers may behave differently.

    -- Jack Krupansky

    -----Original Message-----
    From: Amin Mohammed-Coleman
    Sent: Thursday, January 20, 2011 4:37 PM
    To: [email protected]
    Subject: Wildcard Case Sensitivity

    Hi

    Apologies up front if this question has been asked before.

    I have a document which contains a field that stores an untokenized value
    such as TEST_TYPE. The analyser used is StandardAnalyzer and I pass the
    same analyzer into the query. I perform the following query :
    fieldName:TEST_*, however this does not return any results. Is this the
    expected behaviour? Can I use capital letters in my wildcard query or do i
    need to do some processing before passing it to the query parser?


    Any help would be appreciated.

    Thanks
    Amin
    ---------------------------------------------------------------------
    To unsubscribe, e-mail: [email protected]
    For additional commands, e-mail: [email protected]


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: [email protected]
    For additional commands, e-mail: [email protected]

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedJan 20, '11 at 9:37p
activeJan 20, '11 at 11:23p
posts2
users2
websitelucene.apache.org

People

Translate

site design / logo © 2023 Grokbase