Searching in multiple fields

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Searching in multiple fields

netaji.k
Hello,

We have 4 fields in our XML file --- Description, title, Subject,notes.
I need to search in all these fields, how do I do that?.


For Example
When I search Description: php, we are able to get records that are
matching only with description field. But I want those records in which
title and subject and notes also has php.

please advise on this


regards,
aditya

Reply | Threaded
Open this post in threaded view
|

RE: Searching in multiple fields

Kainth, Sachin
Well,

One way you can do this is:

"Description:php AND title:php AND Subject:php AND notes:php"
 
The other option is to create an extra field in your index called All
(or whatever) that is a concatenation of these fields with a big slop
between the four parts of this field and then you can search that field
using a number smaller than the slop.

Sachin

-----Original Message-----
From: [hidden email] [mailto:[hidden email]]
Sent: 09 March 2007 10:29
To: [hidden email]
Subject: Searching in multiple fields

Hello,

We have 4 fields in our XML file --- Description, title, Subject,notes.
I need to search in all these fields, how do I do that?.


For Example
When I search Description: php, we are able to get records that are
matching only with description field. But I want those records in which
title and subject and notes also has php.

please advise on this


regards,
aditya



This message has been scanned for viruses by MailControl - (see
http://bluepages.wsatkins.co.uk/?6875772)


This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding.

The ultimate parent company of the Atkins Group is WS Atkins plc.  Registered in England No. 1885586.  Registered Office Woodcote Grove, Ashley Road, Epsom, Surrey KT18 5BW.

Consider the environment. Please don't print this e-mail unless you really need to.
Reply | Threaded
Open this post in threaded view
|

RE: Searching in multiple fields

netaji.k

Description:php AND title:php AND Subject:php AND notes:php

this one did not work

i will try the other way too and see

thanks
aditya



> Well,
>
> One way you can do this is:
>
> "Description:php AND title:php AND Subject:php AND notes:php"
>
> The other option is to create an extra field in your index called All
> (or whatever) that is a concatenation of these fields with a big slop
> between the four parts of this field and then you can search that field
> using a number smaller than the slop.
>
> Sachin
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]]
> Sent: 09 March 2007 10:29
> To: [hidden email]
> Subject: Searching in multiple fields
>
> Hello,
>
> We have 4 fields in our XML file --- Description, title, Subject,notes.
> I need to search in all these fields, how do I do that?.
>
>
> For Example
> When I search Description: php, we are able to get records that are
> matching only with description field. But I want those records in which
> title and subject and notes also has php.
>
> please advise on this
>
>
> regards,
> aditya
>
>
>
> This message has been scanned for viruses by MailControl - (see
> http://bluepages.wsatkins.co.uk/?6875772)
>
>
> This email and any attached files are confidential and copyright
> protected. If you are not the addressee, any dissemination of this
> communication is strictly prohibited. Unless otherwise expressly agreed in
> writing, nothing stated in this communication shall be legally binding.
>
> The ultimate parent company of the Atkins Group is WS Atkins plc.
> Registered in England No. 1885586.  Registered Office Woodcote Grove,
> Ashley Road, Epsom, Surrey KT18 5BW.
>
> Consider the environment. Please don't print this e-mail unless you really
> need to.
>


Reply | Threaded
Open this post in threaded view
|

RE: Searching in multiple fields

netaji.k
In reply to this post by Kainth, Sachin

sorry it did work and it is working for OR too.

i will try the second method too.

thank you
aditya

> Well,
>
> One way you can do this is:
>
> "Description:php AND title:php AND Subject:php AND notes:php"
>
> The other option is to create an extra field in your index called All
> (or whatever) that is a concatenation of these fields with a big slop
> between the four parts of this field and then you can search that field
> using a number smaller than the slop.
>
> Sachin
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]]
> Sent: 09 March 2007 10:29
> To: [hidden email]
> Subject: Searching in multiple fields
>
> Hello,
>
> We have 4 fields in our XML file --- Description, title, Subject,notes.
> I need to search in all these fields, how do I do that?.
>
>
> For Example
> When I search Description: php, we are able to get records that are
> matching only with description field. But I want those records in which
> title and subject and notes also has php.
>
> please advise on this
>
>
> regards,
> aditya
>
>
>
> This message has been scanned for viruses by MailControl - (see
> http://bluepages.wsatkins.co.uk/?6875772)
>
>
> This email and any attached files are confidential and copyright
> protected. If you are not the addressee, any dissemination of this
> communication is strictly prohibited. Unless otherwise expressly agreed in
> writing, nothing stated in this communication shall be legally binding.
>
> The ultimate parent company of the Atkins Group is WS Atkins plc.
> Registered in England No. 1885586.  Registered Office Woodcote Grove,
> Ashley Road, Epsom, Surrey KT18 5BW.
>
> Consider the environment. Please don't print this e-mail unless you really
> need to.
>


Reply | Threaded
Open this post in threaded view
|

RE: Searching in multiple fields

Kainth, Sachin
In reply to this post by netaji.k
The AND has to be in all caps.

-----Original Message-----
From: [hidden email] [mailto:[hidden email]]
Sent: 09 March 2007 10:42
To: [hidden email]
Subject: RE: Searching in multiple fields


Description:php AND title:php AND Subject:php AND notes:php

this one did not work

i will try the other way too and see

thanks
aditya



> Well,
>
> One way you can do this is:
>
> "Description:php AND title:php AND Subject:php AND notes:php"
>
> The other option is to create an extra field in your index called All
> (or whatever) that is a concatenation of these fields with a big slop
> between the four parts of this field and then you can search that
> field using a number smaller than the slop.
>
> Sachin
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]]
> Sent: 09 March 2007 10:29
> To: [hidden email]
> Subject: Searching in multiple fields
>
> Hello,
>
> We have 4 fields in our XML file --- Description, title,
Subject,notes.

> I need to search in all these fields, how do I do that?.
>
>
> For Example
> When I search Description: php, we are able to get records that are
> matching only with description field. But I want those records in
> which title and subject and notes also has php.
>
> please advise on this
>
>
> regards,
> aditya
>
>
>
> This message has been scanned for viruses by MailControl - (see
> http://bluepages.wsatkins.co.uk/?6875772)
>
>
> This email and any attached files are confidential and copyright
> protected. If you are not the addressee, any dissemination of this
> communication is strictly prohibited. Unless otherwise expressly
> agreed in writing, nothing stated in this communication shall be
legally binding.
>
> The ultimate parent company of the Atkins Group is WS Atkins plc.
> Registered in England No. 1885586.  Registered Office Woodcote Grove,
> Ashley Road, Epsom, Surrey KT18 5BW.
>
> Consider the environment. Please don't print this e-mail unless you
> really need to.
>


Reply | Threaded
Open this post in threaded view
|

RE: Searching in multiple fields

Kainth, Sachin
In reply to this post by netaji.k
Well,

AND will find documents that have php in all fields but OR will find
documents that have php in any field so you can try the same query with
all ORs.

-----Original Message-----
From: [hidden email] [mailto:[hidden email]]
Sent: 09 March 2007 10:42
To: [hidden email]
Subject: RE: Searching in multiple fields


Description:php AND title:php AND Subject:php AND notes:php

this one did not work

i will try the other way too and see

thanks
aditya



> Well,
>
> One way you can do this is:
>
> "Description:php AND title:php AND Subject:php AND notes:php"
>
> The other option is to create an extra field in your index called All
> (or whatever) that is a concatenation of these fields with a big slop
> between the four parts of this field and then you can search that
> field using a number smaller than the slop.
>
> Sachin
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]]
> Sent: 09 March 2007 10:29
> To: [hidden email]
> Subject: Searching in multiple fields
>
> Hello,
>
> We have 4 fields in our XML file --- Description, title,
Subject,notes.

> I need to search in all these fields, how do I do that?.
>
>
> For Example
> When I search Description: php, we are able to get records that are
> matching only with description field. But I want those records in
> which title and subject and notes also has php.
>
> please advise on this
>
>
> regards,
> aditya
>
>
>
> This message has been scanned for viruses by MailControl - (see
> http://bluepages.wsatkins.co.uk/?6875772)
>
>
> This email and any attached files are confidential and copyright
> protected. If you are not the addressee, any dissemination of this
> communication is strictly prohibited. Unless otherwise expressly
> agreed in writing, nothing stated in this communication shall be
legally binding.
>
> The ultimate parent company of the Atkins Group is WS Atkins plc.
> Registered in England No. 1885586.  Registered Office Woodcote Grove,
> Ashley Road, Epsom, Surrey KT18 5BW.
>
> Consider the environment. Please don't print this e-mail unless you
> really need to.
>


Reply | Threaded
Open this post in threaded view
|

RE: Searching in multiple fields

Chris Hostetter-3

: AND will find documents that have php in all fields but OR will find
: documents that have php in any field so you can try the same query with
: all ORs.

For the record, this is where the DixMaxRequestHandler really shines ...
instead of needing to query for "php" in each of those fields, you just
configure dismax with the list of fields you care about, and for each
field tell it how significant that field is, and it takes care of building
up the query and weighting hte fields accordingly...

        http://wiki.apache.org/solr/DisMaxRequestHandler



-Hoss

Reply | Threaded
Open this post in threaded view
|

ReSearching in multiple fields

Jack L
In reply to this post by Kainth, Sachin
Hello Sachin,

I'm not understanding the second option. Could you explain a bit?

--
Best regards,
Jack

Friday, March 9, 2007, 2:35:36 AM, you wrote:

> Well,

> One way you can do this is:

> "Description:php AND title:php AND Subject:php AND notes:php"
 
> The other option is to create an extra field in your index called All
> (or whatever) that is a concatenation of these fields with a big slop
> between the four parts of this field and then you can search that field
> using a number smaller than the slop.

> Sachin


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 
Reply | Threaded
Open this post in threaded view
|

RE: Searching in multiple fields

netaji.k
In reply to this post by Kainth, Sachin
Yes i tried it and it worked. thank you




> Well,
>
> AND will find documents that have php in all fields but OR will find
> documents that have php in any field so you can try the same query with
> all ORs.
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]]
> Sent: 09 March 2007 10:42
> To: [hidden email]
> Subject: RE: Searching in multiple fields
>
>
> Description:php AND title:php AND Subject:php AND notes:php
>
> this one did not work
>
> i will try the other way too and see
>
> thanks
> aditya
>
>
>
>> Well,
>>
>> One way you can do this is:
>>
>> "Description:php AND title:php AND Subject:php AND notes:php"
>>
>> The other option is to create an extra field in your index called All
>> (or whatever) that is a concatenation of these fields with a big slop
>> between the four parts of this field and then you can search that
>> field using a number smaller than the slop.
>>
>> Sachin
>>
>> -----Original Message-----
>> From: [hidden email] [mailto:[hidden email]]
>> Sent: 09 March 2007 10:29
>> To: [hidden email]
>> Subject: Searching in multiple fields
>>
>> Hello,
>>
>> We have 4 fields in our XML file --- Description, title,
> Subject,notes.
>> I need to search in all these fields, how do I do that?.
>>
>>
>> For Example
>> When I search Description: php, we are able to get records that are
>> matching only with description field. But I want those records in
>> which title and subject and notes also has php.
>>
>> please advise on this
>>
>>
>> regards,
>> aditya
>>
>>
>>
>> This message has been scanned for viruses by MailControl - (see
>> http://bluepages.wsatkins.co.uk/?6875772)
>>
>>
>> This email and any attached files are confidential and copyright
>> protected. If you are not the addressee, any dissemination of this
>> communication is strictly prohibited. Unless otherwise expressly
>> agreed in writing, nothing stated in this communication shall be
> legally binding.
>>
>> The ultimate parent company of the Atkins Group is WS Atkins plc.
>> Registered in England No. 1885586.  Registered Office Woodcote Grove,
>> Ashley Road, Epsom, Surrey KT18 5BW.
>>
>> Consider the environment. Please don't print this e-mail unless you
>> really need to.
>>
>
>
>