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 bhaskar chandrasekar <ba...@yahoo.co.in> on 2009/09/03 10:03:04 UTC

Exact Word Search

Hi,
 
Can any one help me with the below scenario?.
 
Scenario :
 
I have integrated Solr with Carrot2.
The issue is 
Assuming i give "bhaskar" as input string for search.
It should give me search results pertaining to bhaskar only.
 Example: It should not display search results as "chandarbhaskar" or
 "bhaskarc".
 Basically search should happen based on the exact word match. I am not bothered about case sensitive here
 How to achieve the above Scenario in Carrot2 ?.
 
Regards
Bhaskar
 


      

Re: Exact Word Search

Posted by bhaskar chandrasekar <ba...@yahoo.co.in>.
 
Hi Shalin,
 
My search is based on the following fields in schema.xml
 

<field name="url" type="string" indexed="true" stored="true"/>
 <field name="content" type="text" indexed="true" stored="true"/>
 <field name="description" type="string" indexed="true" stored="true"/>
 
 
Let me know if you need anything else?
Regards
Bhaskar

--- On Fri, 9/4/09, Shalin Shekhar Mangar <sh...@gmail.com> wrote:


From: Shalin Shekhar Mangar <sh...@gmail.com>
Subject: Re: Exact Word Search
To: solr-user@lucene.apache.org
Date: Friday, September 4, 2009, 5:51 AM


On Fri, Sep 4, 2009 at 6:06 PM, bhaskar chandrasekar
<ba...@yahoo.co.in>wrote:

>
> Hi,
>
>
> I have integrated Solr with Carrot2 Cluster Engine (v 3.1.0).
>
> Carrot2 is used as a presentation layer. Carrot2 sends requested query to
> external source (Solr) and get results from Solr.
> Carrot2 may not be responsible for forming Query. It would have been
> handled from Solr end.
>

Can you post the exact query that your application or Carrot2 is sending to
Solr? Can you also list the Solr field and type defined in schema.xml which
is being searched?


>
> Please help me with the below scenarios.
>
> Scenario: (Please DO NOT consider any case sensitive)
>
> Assuming I give "bhaskar" as input string
> It should give me search results pertaining to word ‘bhaskar’ only.
>
> I am expecting output like below database query
> Select * from MASTER where name =’bhaskar’;
>
> Above query suppose to return matched records for ‘bhaskar’..
>

Use a solr.TextField with KeywordTokenizer and LowerCaseFilter and search
with q=field-name:"field-value"

-- 
Regards,
Shalin Shekhar Mangar.



      

Re: Exact Word Search

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Fri, Sep 4, 2009 at 6:06 PM, bhaskar chandrasekar
<ba...@yahoo.co.in>wrote:

>
> Hi,
>
>
> I have integrated Solr with Carrot2 Cluster Engine (v 3.1.0).
>
> Carrot2 is used as a presentation layer. Carrot2 sends requested query to
> external source (Solr) and get results from Solr.
> Carrot2 may not be responsible for forming Query. It would have been
> handled from Solr end.
>

Can you post the exact query that your application or Carrot2 is sending to
Solr? Can you also list the Solr field and type defined in schema.xml which
is being searched?


>
> Please help me with the below scenarios.
>
> Scenario: (Please DO NOT consider any case sensitive)
>
> Assuming I give "bhaskar" as input string
> It should give me search results pertaining to word ‘bhaskar’ only.
>
> I am expecting output like below database query
> Select * from MASTER where name =’bhaskar’;
>
> Above query suppose to return matched records for ‘bhaskar’..
>

Use a solr.TextField with KeywordTokenizer and LowerCaseFilter and search
with q=field-name:"field-value"

-- 
Regards,
Shalin Shekhar Mangar.

Re: Exact Word Search

Posted by bhaskar chandrasekar <ba...@yahoo.co.in>.



Hi, 

  
I have integrated Solr with Carrot2 Cluster Engine (v 3.1.0). 
  
Carrot2 is used as a presentation layer. Carrot2 sends requested query to external source (Solr) and get results from Solr. 
Carrot2 may not be responsible for forming Query. It would have been handled from Solr end. 
  
Please help me with the below scenarios.
 
Scenario: (Please DO NOT consider any case sensitive)  
  
Assuming I give "bhaskar" as input string 
It should give me search results pertaining to word ‘bhaskar’ only.  
  
I am expecting output like below database query 
Select * from MASTER where name =’bhaskar’; 
  
Above query suppose to return matched records for ‘bhaskar’.. 
  
My Carrot2 search result should have similar out. 
  
It should not display search results prefixed or suffixed with "bhaskar". 
  



Regards 
Bhaskar 

--- On Fri, 9/4/09, Shalin Shekhar Mangar <sh...@gmail.com> wrote:


From: Shalin Shekhar Mangar <sh...@gmail.com>
Subject: Re: Exact Word Search
To: solr-user@lucene.apache.org
Date: Friday, September 4, 2009, 1:47 AM


If you want to do a exact match (case sensitive) in Solr, you should have a
string type field and the query should be made as fieldname:value

However, reading your mail I get the feeling that the query is actually
being made by Carrot2.

On Fri, Sep 4, 2009 at 7:41 AM, bhaskar chandrasekar
<ba...@yahoo.co.in>wrote:

> Hi shalin,
>
> Thanks for your reply.
> I am not sure as how the query is formed in Solr.
> If you could throw some light on this , it will be helpful.
> Is it achievable?.
>
> Regards
> Bhaskar
>
>
> --- On Thu, 9/3/09, Shalin Shekhar Mangar <sh...@gmail.com> wrote:
>
>
> From: Shalin Shekhar Mangar <sh...@gmail.com>
> Subject: Re: Exact Word Search
> To: solr-user@lucene.apache.org
> Date: Thursday, September 3, 2009, 5:14 AM
>
>
> On Thu, Sep 3, 2009 at 1:33 PM, bhaskar chandrasekar
> <ba...@yahoo.co.in>wrote:
>
> > Hi,
> >
> > Can any one help me with the below scenario?.
> >
> > Scenario :
> >
> > I have integrated Solr with Carrot2.
> > The issue is
> > Assuming i give "bhaskar" as input string for search.
> > It should give me search results pertaining to bhaskar only.
> >  Example: It should not display search results as "chandarbhaskar" or
> >  "bhaskarc".
> >  Basically search should happen based on the exact word match. I am not
> > bothered about case sensitive here
> >  How to achieve the above Scenario in Carrot2 ?.
> >
>
> Bhaskar, I think this question is better suited for the Carrot mailing
> lists. Unless you yourself control how the solr query is created, we will
> not be able to help you.
>
> --
> Regards,
> Shalin Shekhar Mangar.
>
>
>
>
>



-- 
Regards,
Shalin Shekhar Mangar.



      

Re: Exact Word Search

Posted by bhaskar chandrasekar <ba...@yahoo.co.in>.
 
Hi Shalin,
 
Where on in which file should i set the values you have mentioned?.
Let me know how to set it.
 
Regards
Bhaskar

--- On Fri, 9/4/09, Shalin Shekhar Mangar <sh...@gmail.com> wrote:


From: Shalin Shekhar Mangar <sh...@gmail.com>
Subject: Re: Exact Word Search
To: solr-user@lucene.apache.org
Date: Friday, September 4, 2009, 1:47 AM


If you want to do a exact match (case sensitive) in Solr, you should have a
string type field and the query should be made as fieldname:value

However, reading your mail I get the feeling that the query is actually
being made by Carrot2.

On Fri, Sep 4, 2009 at 7:41 AM, bhaskar chandrasekar
<ba...@yahoo.co.in>wrote:

> Hi shalin,
>
> Thanks for your reply.
> I am not sure as how the query is formed in Solr.
> If you could throw some light on this , it will be helpful.
> Is it achievable?.
>
> Regards
> Bhaskar
>
>
> --- On Thu, 9/3/09, Shalin Shekhar Mangar <sh...@gmail.com> wrote:
>
>
> From: Shalin Shekhar Mangar <sh...@gmail.com>
> Subject: Re: Exact Word Search
> To: solr-user@lucene.apache.org
> Date: Thursday, September 3, 2009, 5:14 AM
>
>
> On Thu, Sep 3, 2009 at 1:33 PM, bhaskar chandrasekar
> <ba...@yahoo.co.in>wrote:
>
> > Hi,
> >
> > Can any one help me with the below scenario?.
> >
> > Scenario :
> >
> > I have integrated Solr with Carrot2.
> > The issue is
> > Assuming i give "bhaskar" as input string for search.
> > It should give me search results pertaining to bhaskar only.
> >  Example: It should not display search results as "chandarbhaskar" or
> >  "bhaskarc".
> >  Basically search should happen based on the exact word match. I am not
> > bothered about case sensitive here
> >  How to achieve the above Scenario in Carrot2 ?.
> >
>
> Bhaskar, I think this question is better suited for the Carrot mailing
> lists. Unless you yourself control how the solr query is created, we will
> not be able to help you.
>
> --
> Regards,
> Shalin Shekhar Mangar.
>
>
>
>
>



-- 
Regards,
Shalin Shekhar Mangar.



      

Re: Exact Word Search

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
If you want to do a exact match (case sensitive) in Solr, you should have a
string type field and the query should be made as fieldname:value

However, reading your mail I get the feeling that the query is actually
being made by Carrot2.

On Fri, Sep 4, 2009 at 7:41 AM, bhaskar chandrasekar
<ba...@yahoo.co.in>wrote:

> Hi shalin,
>
> Thanks for your reply.
> I am not sure as how the query is formed in Solr.
> If you could throw some light on this , it will be helpful.
> Is it achievable?.
>
> Regards
> Bhaskar
>
>
> --- On Thu, 9/3/09, Shalin Shekhar Mangar <sh...@gmail.com> wrote:
>
>
> From: Shalin Shekhar Mangar <sh...@gmail.com>
> Subject: Re: Exact Word Search
> To: solr-user@lucene.apache.org
> Date: Thursday, September 3, 2009, 5:14 AM
>
>
> On Thu, Sep 3, 2009 at 1:33 PM, bhaskar chandrasekar
> <ba...@yahoo.co.in>wrote:
>
> > Hi,
> >
> > Can any one help me with the below scenario?.
> >
> > Scenario :
> >
> > I have integrated Solr with Carrot2.
> > The issue is
> > Assuming i give "bhaskar" as input string for search.
> > It should give me search results pertaining to bhaskar only.
> >  Example: It should not display search results as "chandarbhaskar" or
> >  "bhaskarc".
> >  Basically search should happen based on the exact word match. I am not
> > bothered about case sensitive here
> >  How to achieve the above Scenario in Carrot2 ?.
> >
>
> Bhaskar, I think this question is better suited for the Carrot mailing
> lists. Unless you yourself control how the solr query is created, we will
> not be able to help you.
>
> --
> Regards,
> Shalin Shekhar Mangar.
>
>
>
>
>



-- 
Regards,
Shalin Shekhar Mangar.

Re: Exact Word Search

Posted by bhaskar chandrasekar <ba...@yahoo.co.in>.
Hi shalin,
 
Thanks for your reply.
I am not sure as how the query is formed in Solr.
If you could throw some light on this , it will be helpful.
Is it achievable?.
 
Regards
Bhaskar


--- On Thu, 9/3/09, Shalin Shekhar Mangar <sh...@gmail.com> wrote:


From: Shalin Shekhar Mangar <sh...@gmail.com>
Subject: Re: Exact Word Search
To: solr-user@lucene.apache.org
Date: Thursday, September 3, 2009, 5:14 AM


On Thu, Sep 3, 2009 at 1:33 PM, bhaskar chandrasekar
<ba...@yahoo.co.in>wrote:

> Hi,
>
> Can any one help me with the below scenario?.
>
> Scenario :
>
> I have integrated Solr with Carrot2.
> The issue is
> Assuming i give "bhaskar" as input string for search.
> It should give me search results pertaining to bhaskar only.
>  Example: It should not display search results as "chandarbhaskar" or
>  "bhaskarc".
>  Basically search should happen based on the exact word match. I am not
> bothered about case sensitive here
>  How to achieve the above Scenario in Carrot2 ?.
>

Bhaskar, I think this question is better suited for the Carrot mailing
lists. Unless you yourself control how the solr query is created, we will
not be able to help you.

-- 
Regards,
Shalin Shekhar Mangar.



      

Re: Exact Word Search

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Thu, Sep 3, 2009 at 1:33 PM, bhaskar chandrasekar
<ba...@yahoo.co.in>wrote:

> Hi,
>
> Can any one help me with the below scenario?.
>
> Scenario :
>
> I have integrated Solr with Carrot2.
> The issue is
> Assuming i give "bhaskar" as input string for search.
> It should give me search results pertaining to bhaskar only.
>  Example: It should not display search results as "chandarbhaskar" or
>  "bhaskarc".
>  Basically search should happen based on the exact word match. I am not
> bothered about case sensitive here
>  How to achieve the above Scenario in Carrot2 ?.
>

Bhaskar, I think this question is better suited for the Carrot mailing
lists. Unless you yourself control how the solr query is created, we will
not be able to help you.

-- 
Regards,
Shalin Shekhar Mangar.