You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Aaron Bains <aa...@gmail.com> on 2011/09/01 20:26:21 UTC
Wildcard Query
Hello,
The keywords field type is "text_en_splitting"
My query is as follows: q=keywords:(symantec AND corporation)
Result: Documents are returned as normal
My wildcard query is as follows: q=keywords:(symante* AND corporation)
Result: Wildcard functions correctly, and documents are returned
When I try a wildcard on every term as follows: q=keywords:(symante*
AND corporatio*)
Result: No documents are returned.
RE: Wildcard Query
Posted by "Jaeger, Jay - DOT" <Ja...@dot.wi.gov>.
I solved a similar kind of issue (where I actually needed multi-valued attributes, e.g. people with multiple or hyphenated last names) by including PositionFilterFactory in the filter list for the analyzer in such fields' fieldType, thereby setting the position of each value to 1.
JRJ
-----Original Message-----
From: Aaron Bains [mailto:aaronbains@gmail.com]
Sent: Thursday, September 01, 2011 2:00 PM
To: solr-user@lucene.apache.org
Subject: Re: Wildcard Query
I solved the problem by setting multiValued=false
On Thu, Sep 1, 2011 at 2:37 PM, Aaron wrote:
> It seems to work correctly once I remove the brackets like this:
> q=keywords:symante* AND corporatio*
> But I don't understand why...
>
>
> On Thu, Sep 1, 2011 at 2:26 PM, Aaron wrote:
>
>> Hello,
>>
>> The keywords field type is "text_en_splitting"
>>
>> My query is as follows: q=keywords:(symantec AND corporation)
>> Result: Documents are returned as normal
>>
>>
>> My wildcard query is as follows: q=keywords:(symante* AND
>> corporation)
>> Result: Wildcard functions correctly, and documents are returned
>>
>>
>> When I try a wildcard on every term as follows: q=keywords:(symante*
>> AND corporatio*)
>> Result: No documents are returned.
>>
>>
Re: Wildcard Query
Posted by Erick Erickson <er...@gmail.com>.
Setting multivalued="false" is probably a red herring.
This form probably works because you're searching on
two different fields, namely keywords and <default search field>.
APpendint &debugQUery=on to your query will show this.
q=keywords:symante* AND corporatio*
This form probably fails because of stemming
q=keywords:(symante* AND corporatio*)
at a guess. Wildcards aren't analyzed.
"corporation" is probably being stemmed to something
like "corpor", which does not macth
corporatio*
The admin/analysis page helps a lot in cases like this
Best
Erick
On Thu, Sep 1, 2011 at 3:00 PM, Aaron Bains <aa...@gmail.com> wrote:
> I solved the problem by setting multiValued=false
>
> On Thu, Sep 1, 2011 at 2:37 PM, Aaron wrote:
>
>> It seems to work correctly once I remove the brackets like this:
>> q=keywords:symante* AND corporatio*
>> But I don't understand why...
>>
>>
>> On Thu, Sep 1, 2011 at 2:26 PM, Aaron wrote:
>>
>>> Hello,
>>>
>>> The keywords field type is "text_en_splitting"
>>>
>>> My query is as follows: q=keywords:(symantec AND corporation)
>>> Result: Documents are returned as normal
>>>
>>>
>>> My wildcard query is as follows: q=keywords:(symante* AND
>>> corporation)
>>> Result: Wildcard functions correctly, and documents are returned
>>>
>>>
>>> When I try a wildcard on every term as follows: q=keywords:(symante*
>>> AND corporatio*)
>>> Result: No documents are returned.
>>>
>>>
>
Re: Wildcard Query
Posted by Aaron Bains <aa...@gmail.com>.
I solved the problem by setting multiValued=false
On Thu, Sep 1, 2011 at 2:37 PM, Aaron wrote:
> It seems to work correctly once I remove the brackets like this:
> q=keywords:symante* AND corporatio*
> But I don't understand why...
>
>
> On Thu, Sep 1, 2011 at 2:26 PM, Aaron wrote:
>
>> Hello,
>>
>> The keywords field type is "text_en_splitting"
>>
>> My query is as follows: q=keywords:(symantec AND corporation)
>> Result: Documents are returned as normal
>>
>>
>> My wildcard query is as follows: q=keywords:(symante* AND
>> corporation)
>> Result: Wildcard functions correctly, and documents are returned
>>
>>
>> When I try a wildcard on every term as follows: q=keywords:(symante*
>> AND corporatio*)
>> Result: No documents are returned.
>>
>>
Re: Wildcard Query
Posted by Aaron Bains <aa...@gmail.com>.
It seems to work correctly once I remove the brackets like this:
q=keywords:symante* AND corporatio*
But I don't understand why...
On Thu, Sep 1, 2011 at 2:26 PM, Aaron Bains <aa...@gmail.com> wrote:
> Hello,
>
> The keywords field type is "text_en_splitting"
>
> My query is as follows: q=keywords:(symantec AND corporation)
> Result: Documents are returned as normal
>
>
> My wildcard query is as follows: q=keywords:(symante* AND corporation)
> Result: Wildcard functions correctly, and documents are returned
>
>
> When I try a wildcard on every term as follows: q=keywords:(symante*
> AND corporatio*)
> Result: No documents are returned.
>
>
--
Aaron Bains, Ivey HBA
+1 519.868.0820 (Mobile)
aaronb@microcad.ca