lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Willnauer <simon.willna...@googlemail.com>
Subject Re: questions about searching lucene 3.2
Date Fri, 24 Jun 2011 05:08:35 GMT
On Thu, Jun 23, 2011 at 3:46 PM, Bob Rhodes <Bob.Rhodes@trssllc.com> 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 [mailto:simon.willnauer@googlemail.com]
> 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 <Bob.Rhodes@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) 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 [mailto:Bob.Rhodes@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-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


Mime
View raw message