Re: Exact word search in Solr

2009-09-21 Thread bhaskar chandrasekar
 
Hi,
 
I followed with the below metioned steps and i am not getting the desired 
results.
Let me know if anything else to be done.
 
Regards
Bhaskar

--- On Fri, 9/18/09, AHMET ARSLAN iori...@yahoo.com wrote:


From: AHMET ARSLAN iori...@yahoo.com
Subject: Re: Exact word search in Solr
To: solr-user@lucene.apache.org
Date: Friday, September 18, 2009, 2:59 AM


 Hi,
  I am doing exact word search in Solr 1.3 and I am not
 getting the expected results.
 I am giving you the sample XML file along with the mail
 from where search results are fetched.
 The following steps were followed to achieve exact word
 search result in Solr.

You can simply use the fieldType below to achieve this:

fieldType name=text_ws class=solr.TextField positionIncrementGap=100
analyzer
   tokenizer class=solr.WhitespaceTokenizerFactory/
   filter class=solr.LowerCaseFilterFactory/
/analyzer
/fieldType

Note that there is no WordDelimiterFilterFactory in this type. But probably 
yours has it.

Hope this helps.






  

Re: Exact word search in Solr

2009-09-21 Thread Chris Hostetter

: I followed with the below metioned steps and i am not getting the desired 
results.
: Let me know if anything else to be done.

Ahmet's point was to declare the text_ws fieldtype and then use it on the 
field you want to have an exact match.

FWIW: describing your goal as an exact word search is missleading, since 
your examples are case-insensitive.


-Hoss



Exact word search in Solr

2009-09-18 Thread bhaskar chandrasekar
Hi,
 I am doing exact word search in Solr 1.3 and I am not getting the expected 
results.
I am giving you the sample XML file along with the mail from where search 
results are fetched.
The following steps were followed to achieve exact word search result in Solr.
 
1)  Schema.xml is configured for title, url and description
field name=url type=string indexed=true stored=true required=true/
field name=title type=text indexed=true stored=true required=true / 
field name=description type=text indexed=true stored=true 
required=true/
 
Commented below lines
  !--filter class=solr.EnglishPorterFilterFactory 
protected=protwords.txt/--
!--filter class=solr.EnglishPorterFilterFactory 
protected=protwords.txt/--
2) Started Solr server
3)  Indexed sample data with title, url  description 
5)  Assume I am giving (say channelone) as my input search string for exact 
word search in Solr admin page.
 
I am getting the following output.It sould show output pertaining to channelone 
only.It should not display combination of words with “channelone”.I am not 
looking for case sensitive search here.
  doc
  field name=urlhttp://c2search1/contactus3.html/field 
  field name=titlec2Search1: Contactus3/field 
  field name=descriptionchannelOne/field 
  /doc
- doc
  field name=urlhttp://c2search1/contactus4.html/field 
  field name=titlec2Search1: Contactus4/field 
  field name=descriptionChannelone/field 
  /doc
- doc
  field name=urlhttp://c2search1/contactus5.html/field 
  field name=titlec2Search1: Contactus5/field 
  field name=descriptionchannel...@$/field 
  /doc
- doc
  field name=urlhttp://c2search1/contactus6.html/field 
  field name=titlec2Search1: Contactus6/field 
  field name=descriptionchannelon...@$/field 
  /doc
- doc
  field name=urlhttp://c2search1/contactus7.html/field 
  field name=titlec2Search1: Contactus7/field 
  field name=descriptionchannelon...@$ab/field 
 /doc
 
 
Expected Result
  doc
  field name=urlhttp://c2search1/contactus3.html/field 
  field name=titlec2Search1: Contactus3/field 
  field name=descriptionchannelOne/field 
  /doc
- doc
  field name=urlhttp://c2search1/contactus4.html/field 
  field name=titlec2Search1: Contactus4/field 
  field name=descriptionChannelone/field 
  /doc
 
 
Please help me with the above scenario to achieve the desired output.
 
Regards
Bhaskar


  

Re: Exact word search in Solr

2009-09-18 Thread AHMET ARSLAN
 Hi,
  I am doing exact word search in Solr 1.3 and I am not
 getting the expected results.
 I am giving you the sample XML file along with the mail
 from where search results are fetched.
 The following steps were followed to achieve exact word
 search result in Solr.

You can simply use the fieldType below to achieve this:

fieldType name=text_ws class=solr.TextField positionIncrementGap=100
 analyzer
   tokenizer class=solr.WhitespaceTokenizerFactory/
   filter class=solr.LowerCaseFilterFactory/
 /analyzer
/fieldType

Note that there is no WordDelimiterFilterFactory in this type. But probably 
yours has it.

Hope this helps.





Re: Exact Word Search

2009-09-07 Thread bhaskar chandrasekar
 
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 shalinman...@gmail.com wrote:


From: Shalin Shekhar Mangar shalinman...@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
bas_s...@yahoo.co.inwrote:


 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

2009-09-04 Thread Shalin Shekhar Mangar
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
bas_s...@yahoo.co.inwrote:

 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 shalinman...@gmail.com wrote:


 From: Shalin Shekhar Mangar shalinman...@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
 bas_s...@yahoo.co.inwrote:

  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

2009-09-04 Thread bhaskar chandrasekar
 
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 shalinman...@gmail.com wrote:


From: Shalin Shekhar Mangar shalinman...@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
bas_s...@yahoo.co.inwrote:

 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 shalinman...@gmail.com wrote:


 From: Shalin Shekhar Mangar shalinman...@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
 bas_s...@yahoo.co.inwrote:

  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

2009-09-04 Thread bhaskar chandrasekar




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 shalinman...@gmail.com wrote:


From: Shalin Shekhar Mangar shalinman...@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
bas_s...@yahoo.co.inwrote:

 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 shalinman...@gmail.com wrote:


 From: Shalin Shekhar Mangar shalinman...@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
 bas_s...@yahoo.co.inwrote:

  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

2009-09-04 Thread Shalin Shekhar Mangar
On Fri, Sep 4, 2009 at 6:06 PM, bhaskar chandrasekar
bas_s...@yahoo.co.inwrote:


 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.


Exact Word Search

2009-09-03 Thread bhaskar chandrasekar
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

2009-09-03 Thread Shalin Shekhar Mangar
On Thu, Sep 3, 2009 at 1:33 PM, bhaskar chandrasekar
bas_s...@yahoo.co.inwrote:

 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

2009-09-03 Thread bhaskar chandrasekar
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 shalinman...@gmail.com wrote:


From: Shalin Shekhar Mangar shalinman...@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
bas_s...@yahoo.co.inwrote:

 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

2009-08-26 Thread Shalin Shekhar Mangar
On Tue, Aug 25, 2009 at 10:40 AM, bhaskar chandrasekar bas_s...@yahoo.co.in
 wrote:

 Hi,

 Can any one helpe me with the below scenario?.

 Scenario 1:

 Assume that I give Google as input string
 i am using Carrot with Solr
 Carrot is for front end display purpose


It seems like Carrot is the one making the queries to Solr? In that case,
this question may be better suited for carrot users/developers.



 the issue is
 Assuming i give BHASKAR as input string
 It should give me search results pertaining to BHASKAR only.
  Select * from MASTER where name =Bhaskar;
  Example:It should not display search results as ChandarBhaskar or
  BhaskarC.
  Should display Bhaskar only.



That is easy with Solr, make a query like field-name:Bhaskar. Make sure
that field name is not tokenized i.e. string type in schema.xml



 Scenario 2:
  Select * from MASTER where name like %BHASKAR%;
  It should display records containing the word BHASKAR
  Ex: Bhaskar
 ChandarBhaskar
  BhaskarC
  Bhaskarabc


Leading wildcards are not supported. However there are alternate ways of
doing it.

Create two fields, keep one as a normal string type and use a
KeywordTokenizer and ReverseFilter on the other. Make one field a copyField
of the other. Perform a prefix search on both fields.

-- 
Regards,
Shalin Shekhar Mangar.


Exact word search

2009-08-24 Thread bhaskar chandrasekar
Hi,
 
Can any one helpe me with the below scenario?.
 
Scenario 1:
 
Assume that I give Google as input string 
i am using Carrot with Solr 
Carrot is for front end display purpose 
the issue is 
Assuming i give BHASKAR as input string 
It should give me search results pertaining to BHASKAR only.
 Select * from MASTER where name =Bhaskar;
 Example:It should not display search results as ChandarBhaskar or
 BhaskarC.
 Should display Bhaskar only.
 
Scenario 2:
 Select * from MASTER where name like %BHASKAR%;
 It should display records containing the word BHASKAR
 Ex: Bhaskar
ChandarBhaskar
 BhaskarC
 Bhaskarabc

 How to achieve Scenario 1 in Solr ?.



...
 
Regards
Bhaskar