FAQ
i am trying to search for a value which begins with a '$' or even sometimes
'$$'. '$' is not listed as a special character and no matter what i try, i
can not get a search for $* to return anything. Using Luke, i browse my
index and see several entries where the value exists with a leading '$'.
How can i search for these?

Search Discussions

  • Grant Ingersoll at Jul 2, 2010 at 1:30 pm
    What analyzer are you using? Did you check that it is making it through your analyzer?

    -Grant
    On Jul 1, 2010, at 2:56 PM, Nathaniel Auvil wrote:

    i am trying to search for a value which begins with a '$' or even sometimes
    '$$'. '$' is not listed as a special character and no matter what i try, i
    can not get a search for $* to return anything. Using Luke, i browse my
    index and see several entries where the value exists with a leading '$'.
    How can i search for these?

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Nathaniel Auvil at Jul 2, 2010 at 1:53 pm
    I am using this analyzer: @Analyzer(impl =
    org.apache.lucene.analysis.standard.StandardAnalyzer.class)

    "$" is not inlcluded in the STOP_WORDS for this analyzer. Is there
    somewhere else i should be looking? When i use Luke with the
    standardAnalyzer, it does not parse the query. Is there a way to see why?


    On Fri, Jul 2, 2010 at 9:29 AM, Grant Ingersoll wrote:

    What analyzer are you using? Did you check that it is making it through
    your analyzer?

    -Grant
    On Jul 1, 2010, at 2:56 PM, Nathaniel Auvil wrote:

    i am trying to search for a value which begins with a '$' or even sometimes
    '$$'. '$' is not listed as a special character and no matter what i try, i
    can not get a search for $* to return anything. Using Luke, i browse my
    index and see several entries where the value exists with a leading '$'.
    How can i search for these?

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Ahmet Arslan at Jul 3, 2010 at 11:38 am

    I am using this analyzer:
    @Analyzer(impl =
    org.apache.lucene.analysis.standard.StandardAnalyzer.class)

    "$" is not inlcluded in the STOP_WORDS for this
    analyzer.  Is there
    somewhere else i should be looking?  When i use Luke
    with the
    standardAnalyzer, it does not parse the query.  Is
    there a way to see why?
    "$" won't survive StandardAnalyzer. You can use WhitespaceAnalyzer instead.




    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Nathaniel Auvil at Jul 9, 2010 at 5:46 pm
    this works, however WhitespaceAnalyzer is case sensitive. Is there a way to
    make it case insensitive?

    On Sat, Jul 3, 2010 at 7:37 AM, Ahmet Arslan wrote:

    I am using this analyzer:
    @Analyzer(impl =
    org.apache.lucene.analysis.standard.StandardAnalyzer.class)

    "$" is not inlcluded in the STOP_WORDS for this
    analyzer. Is there
    somewhere else i should be looking? When i use Luke
    with the
    standardAnalyzer, it does not parse the query. Is
    there a way to see why?
    "$" won't survive StandardAnalyzer. You can use WhitespaceAnalyzer instead.




    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Ahmet Arslan at Jul 9, 2010 at 6:57 pm

    WhitespaceAnalyzer is case sensitive.  Is there a way
    to
    make it case insensitive?
    You can build your custom analyzer using WhitespaceTokenizer + LowercaseFilter. Source code of an existing analyzer will help you.

    public TokenStream tokenStream(String fieldName, Reader reader) {
    WhitespaceTokenizer tokenStream = new WhitespaceTokenizer(matchVersion, reader);
    tokenStream = new LowerCaseFilter(result);
    return result;
    }




    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Erick Erickson at Jul 5, 2010 at 12:08 pm
    You're probably getting mislead by storing .vs. indexing.
    When you say that the '$' is showing up in Luke, I'm
    guessing that what you actually are looking at is the
    stored value rather than the indexed tokens. You can
    look at both with Luke, but it can be confusing...

    FWIW
    Erick

    On Thu, Jul 1, 2010 at 2:56 PM, Nathaniel Auvil
    wrote:
    i am trying to search for a value which begins with a '$' or even sometimes
    '$$'. '$' is not listed as a special character and no matter what i try, i
    can not get a search for $* to return anything. Using Luke, i browse my
    index and see several entries where the value exists with a leading '$'.
    How can i search for these?

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedJul 1, '10 at 6:57p
activeJul 9, '10 at 6:57p
posts7
users4
websitelucene.apache.org

People

Translate

site design / logo © 2022 Grokbase