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 <bob.rho...@trssllc.com> 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 [mailto:bob.rho...@trssllc.com]
> 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to