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 Mahesh Udupa <ma...@gmail.com> on 2008/02/19 02:01:03 UTC

Field Search

Hi,

I have a content with *title* as "*Advertise*" under a *category* "*Sales*"
And also, I have 3 other contents with *titles "{TV, Web,Radio}"*
under a *category
"Advertise"*
**
Now, if I try to search for,
*title:Advertise --- * I am getting following results:
======================
Title         ---       Category
======================
Advertise  ---       Sales
TV           ---       Advertise
 Radio       ---       Advertise
 Web         ---      Advertise

I have given a query such that get me all title which matches "*Advertise"*.

But, it displayed all content which matches "advertise"(even though title is
different)

How can I search a content which matches only "*advertise"* as *title*?

Schema.xml

<defaultSearchField>text</defaultSearchField>
<solrQueryParser defaultOperator="OR"/>
Thanks in advance for your precious time.
-kmu

Re: Field Search

Posted by Chris Hostetter <ho...@fucit.org>.
: Now, if I try to search for,
: *title:Advertise --- * I am getting following results:
	...
: I forgot to put my dismax request handler.

dismax doesn't support any special syntax in the query string, if you want 
to search for words only in a single field, make sure that is the only 
field in the qf.


-Hoss


Re: Field Search

Posted by Mahesh Udupa <ma...@gmail.com>.
Hi,

I forgot to put my dismax request handler.

<requestHandler name="dismax" class="solr.DisMaxRequestHandler" >
    <lst name="defaults">
     <str name="echoParams">explicit</str>
     <float name="tie">0.01</float>
     <str name="qf">
        text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
     </str>
     <str name="pf">
        text^0.2 features^1.1 name^1.5 manu^1.4 manu_exact^1.9
     </str>
     <str name="bf">
        ord(poplarity)^0.5 recip(rord(price),1,1000,1000)^0.3
     </str>
     <str name="fl">
        id,name,price,score
     </str>
     <str name="mm">
        2&lt;-1 5&lt;-2 6&lt;90%
     </str>
     <int name="ps">100</int>
     <str name="q.alt">*:*</str>
    </lst>
  </requestHandler>

Do you think this is causing some issue?

-Thanks and Regards,
kmu


On Feb 19, 2008 6:31 AM, Mahesh Udupa <ma...@gmail.com> wrote:

> Hi,
>
> I have a content with *title* as "*Advertise*" under a *category* "*Sales*
> "
> And also, I have 3 other contents with *titles "{TV, Web,Radio}"* under a
> *category "Advertise"*
> **
> Now, if I try to search for,
> *title:Advertise --- * I am getting following results:
> ======================
> Title         ---       Category
> ======================
> Advertise  ---       Sales
> TV           ---       Advertise
>  Radio       ---       Advertise
>  Web         ---      Advertise
>
> I have given a query such that get me all title which matches "*Advertise"
> *.
> But, it displayed all content which matches "advertise"(even though title
> is different)
>
> How can I search a content which matches only "*advertise"* as *title*?
>
> Schema.xml
>
> <defaultSearchField>text</defaultSearchField>
> <solrQueryParser defaultOperator="OR"/>
> Thanks in advance for your precious time.
> -kmu
>