FAQ
Hey guys,

I've been a big fan of Lucene and have been working with it for sometime.

While trying to use Lucene I often found myself scouring the web, javadoc,
source code, and this mailing list for answers to many of the questions I
had. I wished there was a site where I could find solutions to common
problems, main concepts, and architectural information. I wanted to try to
help here.

Some of you may have already received an e-mail about a cool project that I
have been working on. I am trying to help programmers better understand the
guts of Lucene by creating a simple site consisting of documentation
for the main ideas of Lucene. You can find it here

http://www.codemaps.org/s/Lucene_API
http://www.codemaps.org/s/Lucene_Core

I want to make this resource available to everyone, and have made the
underlying tooling free for projects like Lucene.

There has been some positive feedback for the site, but I wanted to hear
what the Lucene community thinks of CodeMaps before I focus on other
projects.

Thank You,
Seth Rosen
www.architexa.com
seth@architexa.com
Understand and Document in Seconds!


PS
You can find more information on this initiative here:
http://www.architexa.com/start/open-source

Search Discussions

  • Bob Rhodes at Jun 22, 2011 at 3:56 pm
    Hi all,
    I have some questions about searching 3.2. I have just upgraded from 2.4.1
    to 3.2. I am using the standard analyzer to create the index and to search,
    and one of the fields is called "querytext" and it has content like this
    among other things: phoneNumber="(904) 555-1212". I've tried many different
    ways to query this using the query api and the query parser and I can't find
    the string above. It seems the analyzer tokenizes the number above as 904
    555 1212. The numbers I am searching with are formatted as 9045551212 and I
    need to use that someone to find the number formatted as above. Thanks for
    the help!


    Bob
  • Bob Rhodes at Jun 22, 2011 at 7:47 pm
    Here is a follow-up. This is a larger example of some of the text I'm
    searching in my index:
    The quoted name/value pairs are in the index.
    "
    middleName="D", zip="1111", lastName="ADAMSON", street="00 SOME ST",
    addAssociates="true", state="CA", city="ROCHESTER", source="SOMESOURCE",
    person_user="TESTUSER", dob="19510210", firstName="CHARLES"
    "

    If I use my app or Luke to search for ADAMSON I get matches when searching
    the field above that contains the example text. I get the same results if I
    search by the dob value 19510210 works great.
    The field content is variable and when the field above only contains
    phoneNumber="(904) 555-1212" there is no way for me to find this exact
    number.

    If I use the ClassicAnalyzer this I can use this to find my number by just
    searching "(904) 501-0560" for the number.

    I think this more clearly states my issue. Is the problem related to the
    parens? I've tried escaping and double escaping them to no avail. Anyone
    have any suggestions?

    In my code I've used the standard query parser as well as the
    ComplexPhraseQueryParser.

    One other point to note. The indexes I'm searching were created with 2.1.4
    using the StandardAnalyzer but I'm using 3.2.0 to search.

    Bob


    -----Original Message-----
    From: Bob Rhodes
    Sent: Wednesday, June 22, 2011 11:56 AM
    To: java-user@lucene.apache.org
    Subject: questions about searching lucene 3.2

    Hi all,
    I have some questions about searching 3.2. I have just upgraded from 2.4.1
    to 3.2. I am using the standard analyzer to create the index and to search,
    and one of the fields is called "querytext" and it has content like this
    among other things: phoneNumber="(904) 555-1212". I've tried many different
    ways to query this using the query api and the query parser and I can't find
    the string above. It seems the analyzer tokenizes the number above as 904
    555 1212. The numbers I am searching with are formatted as 9045551212 and I
    need to use that someone to find the number formatted as above. Thanks for
    the help!


    Bob
  • Simon Willnauer at Jun 23, 2011 at 6:30 am
    As far as I understand you have 2 different problems.

    1. search and 2.4 index with 3.2 code using standard analyzer.
    in this case you should either reindex or pass Version.LUCENE_24 to
    the StandardAnalyzer ctor that should help here.

    2. search a string with parentheses with the query parser
    you should escape you query string with QueryParser#escape before searching.

    maybe I am misssing something, let me know if thats the case.

    simon
    On Wed, Jun 22, 2011 at 9:46 PM, Bob Rhodes wrote:
    Here is a follow-up. This is a larger example of some of the text I'm
    searching in my index:
    The quoted name/value pairs are in the index.
    "
    middleName="D", zip="1111", lastName="ADAMSON", street="00 SOME ST",
    addAssociates="true", state="CA", city="ROCHESTER", source="SOMESOURCE",
    person_user="TESTUSER", dob="19510210", firstName="CHARLES"
    "

    If I use my app or Luke to search for ADAMSON I get matches when searching
    the field above that contains the example text. I get the same results if I
    search by the dob value 19510210 works great.
    The field content is variable and when the field above only contains
    phoneNumber="(904) 555-1212" there is no way for me to find this exact
    number.

    If I use the ClassicAnalyzer this I can use this to find my number by just
    searching "(904) 501-0560" for the number.

    I think this more clearly states my issue. Is the problem related to the
    parens? I've tried escaping and double escaping them to no avail. Anyone
    have any suggestions?

    In my code I've used the standard query parser as well as the
    ComplexPhraseQueryParser.

    One other point to note. The indexes I'm searching were created with 2.1.4
    using the StandardAnalyzer but I'm using 3.2.0 to search.

    Bob


    -----Original Message-----
    From: Bob Rhodes
    Sent: Wednesday, June 22, 2011 11:56 AM
    To: java-user@lucene.apache.org
    Subject: questions about searching lucene 3.2

    Hi all,
    I have some questions about searching 3.2. I have just upgraded from 2.4.1
    to 3.2. I am using the standard analyzer to create the index and to search,
    and one of the fields is called "querytext" and it has content like this
    among other things: phoneNumber="(904) 555-1212". I've tried many different
    ways to query this using the query api and the query parser and I can't find
    the string above. It seems the analyzer tokenizes the number above as 904
    555 1212. The numbers I am searching with are formatted as 9045551212 and I
    need to use that someone to find the number formatted as above. Thanks for
    the help!


    Bob

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Bob Rhodes at Jun 23, 2011 at 1:47 pm
    Yeah I agree that this is the issue. I did get my query to work using the
    "ClassicAnalyzer". I guess maybe I need to upgrade my indexes which will be a
    big job. Any advice here is appreciated.
    I didn't have any luck passing Version.LUCENE_24 to the StandardAnalyzer.
    There query still didn't work.
    Also, is there any downside to just continuing with the ClassicAnalyzer?

    Bob

    -----Original Message-----
    From: Simon Willnauer
    Sent: Thursday, June 23, 2011 2:30 AM
    To: java-user@lucene.apache.org
    Subject: Re: questions about searching lucene 3.2

    As far as I understand you have 2 different problems.

    1. search and 2.4 index with 3.2 code using standard analyzer.
    in this case you should either reindex or pass Version.LUCENE_24 to
    the StandardAnalyzer ctor that should help here.

    2. search a string with parentheses with the query parser
    you should escape you query string with QueryParser#escape before searching.

    maybe I am misssing something, let me know if thats the case.

    simon
    On Wed, Jun 22, 2011 at 9:46 PM, Bob Rhodes wrote:
    Here is a follow-up. This is a larger example of some of the text I'm
    searching in my index:
    The quoted name/value pairs are in the index.
    "
    middleName="D", zip="1111", lastName="ADAMSON", street="00 SOME ST",
    addAssociates="true", state="CA", city="ROCHESTER", source="SOMESOURCE",
    person_user="TESTUSER", dob="19510210", firstName="CHARLES"
    "

    If I use my app or Luke to search for ADAMSON I get matches when searching
    the field above that contains the example text. I get the same results if I
    search by the dob value 19510210 works great.
    The field content is variable and when the field above only contains
    phoneNumber="(904) 555-1212" there is no way for me to find this exact
    number.

    If I use the ClassicAnalyzer this I can use this to find my number by just
    searching "(904) 555-1212" for the number.

    I think this more clearly states my issue. Is the problem related to the
    parens? I've tried escaping and double escaping them to no avail. Anyone
    have any suggestions?

    In my code I've used the standard query parser as well as the
    ComplexPhraseQueryParser.

    One other point to note. The indexes I'm searching were created with 2.1.4
    using the StandardAnalyzer but I'm using 3.2.0 to search.

    Bob


    -----Original Message-----
    From: Bob Rhodes
    Sent: Wednesday, June 22, 2011 11:56 AM
    To: java-user@lucene.apache.org
    Subject: questions about searching lucene 3.2

    Hi all,
    I have some questions about searching 3.2. I have just upgraded from 2.4.1
    to 3.2. I am using the standard analyzer to create the index and to search,
    and one of the fields is called "querytext" and it has content like this
    among other things: phoneNumber="(904) 555-1212". I've tried many different
    ways to query this using the query api and the query parser and I can't find
    the string above. It seems the analyzer tokenizes the number above as 904
    555 1212. The numbers I am searching with are formatted as 9045551212 and I
    need to use that someone to find the number formatted as above. Thanks for
    the help!


    Bob

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Simon Willnauer at Jun 24, 2011 at 5:09 am

    On Thu, Jun 23, 2011 at 3:46 PM, Bob Rhodes wrote:
    Yeah I agree that this is the issue. I did get my query to work using the
    "ClassicAnalyzer". I guess maybe I need to upgrade my indexes which will be a
    big job. Any advice here is appreciated.
    I didn't have any luck passing Version.LUCENE_24 to the StandardAnalyzer.
    There query still didn't work.
    Also, is there any downside to just continuing with the ClassicAnalyzer?
    not at all... the StandardAnalyzer has been rewritten and for
    backwards compatibility reasons the "old" 2.4 version has been moved
    into ClassicAnalyzer so its exactly the right thing todo. I just
    wonder why the version didn't work but maybe we did that intentionally
    and I simply don't remember.

    simon
    Bob

    -----Original Message-----
    From: Simon Willnauer
    Sent: Thursday, June 23, 2011 2:30 AM
    To: java-user@lucene.apache.org
    Subject: Re: questions about searching lucene 3.2

    As far as I understand you have 2 different problems.

    1. search and 2.4 index with 3.2 code using standard analyzer.
    in this case you should either reindex or pass Version.LUCENE_24 to
    the StandardAnalyzer ctor that should help here.

    2. search a string with parentheses with the query parser
    you should escape you query string with QueryParser#escape before searching.

    maybe I am misssing something, let me know if thats the case.

    simon
    On Wed, Jun 22, 2011 at 9:46 PM, Bob Rhodes wrote:
    Here is a follow-up. This is a larger example of some of the text I'm
    searching in my index:
    The quoted name/value pairs are in the index.
    "
    middleName="D", zip="1111", lastName="ADAMSON", street="00 SOME ST",
    addAssociates="true", state="CA", city="ROCHESTER", source="SOMESOURCE",
    person_user="TESTUSER", dob="19510210", firstName="CHARLES"
    "

    If I use my app or Luke to search for ADAMSON I get matches when searching
    the field above that contains the example text. I get the same results if I
    search by the dob value 19510210 works great.
    The field content is variable and when the field above only contains
    phoneNumber="(904) 555-1212" there is no way for me to find this exact
    number.

    If I use the ClassicAnalyzer this I can use this to find my number by just
    searching "(904) 555-1212" for the number.

    I think this more clearly states my issue. Is the problem related to the
    parens? I've tried escaping and double escaping them to no avail. Anyone
    have any suggestions?

    In my code I've used the standard query parser as well as the
    ComplexPhraseQueryParser.

    One other point to note. The indexes I'm searching were created with 2.1.4
    using the StandardAnalyzer but I'm using 3.2.0 to search.

    Bob


    -----Original Message-----
    From: Bob Rhodes
    Sent: Wednesday, June 22, 2011 11:56 AM
    To: java-user@lucene.apache.org
    Subject: questions about searching lucene 3.2

    Hi all,
    I have some questions about searching 3.2. I have just upgraded from 2.4.1
    to 3.2. I am using the standard analyzer to create the index and to search,
    and one of the fields is called "querytext" and it has content like this
    among other things: phoneNumber="(904) 555-1212". I've tried many different
    ways to query this using the query api and the query parser and I can't find
    the string above. It seems the analyzer tokenizes the number above as 904
    555 1212. The numbers I am searching with are formatted as 9045551212 and I
    need to use that someone to find the number formatted as above. Thanks for
    the help!


    Bob

    ---------------------------------------------------------------------
    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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedJun 22, '11 at 2:22p
activeJun 24, '11 at 5:09a
posts6
users3
websitelucene.apache.org

People

Translate

site design / logo © 2022 Grokbase