RE: Perfect Match

2010-03-29 Thread Nair, Manas
Awesome Ahmet.
Thanks for the reply. It seems to work now.
 
Thanks a ton.



From: Ahmet Arslan [mailto:iori...@yahoo.com]
Sent: Tue 3/23/2010 2:35 PM
To: solr-user@lucene.apache.org
Subject: RE: Perfect Match



 Thankyou Ahmet. You were right.
 artist_s:Dora is bringing results.
 But I need artist_s:Dora the explorer to bring only those
 results which contain Dora the explorer.
 
 I tried to give artist_s:Dora the explorer (phrase
 search).. that is working. But artist_s:Dora the explorer is
 not working. Any way to make this artist_s:Dora the explorer
 to return results that contain this in them.

I learned this from Chris Hostetter's message[1] You can use
q={!field f=artist_s}Dora the explorer
instead of q=artist_s:Dora the explorer.

[1]http://search-lucene.com/m/rrHVV1ZhO4j/this+is+what+the+%22field%22+QParserPlugin+was+invented+for


 




field QParserPlugin - Help needed

2010-03-29 Thread Nair, Manas
Hello Experts,

Could anyone please help me by directing me to some link where I can get more 
details on Solr's field QParserPlugin.

I would be really grateful.

Thankyou all,

Manas



field QParserPlugin - Help needed

2010-03-29 Thread Nair, Manas
 

Hello Experts,

Could anyone please help me by directing me to some link where I can get more 
details on Solr's field QParserPlugin.

I would be really grateful.

Thankyou all,

Manas





RE: Excluding field from the results

2010-03-26 Thread Nair, Manas
If description is your field name(say), then you could declare description in 
your schema.xml as non stored by specifying stored=false in the field 
declaration as in 
 
field name=description stored=false
 
 
Manas



From: Jean-Sebastien Vachon [mailto:js.vac...@videotron.ca]
Sent: Fri 3/26/2010 1:51 PM
To: solr-user@lucene.apache.org
Subject: Excluding field from the results



Hi,

Is there an easy way to prevent a field from being returned in the response?

we can use fl=field1, field2, field3, ...

but then our software has an option that must trigger the presence or not of a 
field in the response.
So what I'd like to do is tell Solr to return all fields except one.

Does Solr support this?

I imagine the syntax could look like this:

fl=*, -description

Since this is not working, is there any other way of doing this? Otherwise, I 
will have to manage multiple list of fields.

Thanks




Perfect Match

2010-03-23 Thread Nair, Manas
Hello Experts,
 
I need help on one of my issues with perfect matching of terms.
 
I have a collection of artists which are stored in the index against the field 
name artist_t which is a text type field. This field consists of values like 
[dora, Dora The Explorer, Princess Dora The explorer] across various docs 
as in 
 
doc
field name=artist_tDora/field
/doc
doc
field name=artist_tDora The Explorer/field
/doc
doc
field name=artist_tPrincess Dora The Explorer/field
/doc
 
I am searching specifically on artist_t like q=artist_t:Dora.
What I need is the one document which matches exactly with Dora, ie. the first 
doc. Dora the Explorer and Princess Dora The Explorer should not come along 
with it.
 
But I am getting all the above.
 
To tackle this problem, I tried to copyfield this artist_t to a new field 
called artist_s which is of type string and indexed the content again. But this 
approach also doesnt help.
I tried to create a new field type with Keyword Tokenizer. and tried to create 
a field of that type and copied artist_t to this field. That also doesnt work.
 
Is there any way of doing this??
 
I need exact match ie. if I search for artist_t:Dora The Explorer, I should get 
only the second doc and not the third one(Princess Dora The Explorer).
 
 
Please Help!!
 
Manas


RE: Perfect Match

2010-03-23 Thread Nair, Manas
Thankyou Ahmet. You were right. artist_s:Dora is bringing results.
But I need artist_s:Dora the explorer to bring only those results which contain 
Dora the explorer.
 
I tried to give artist_s:Dora the explorer (phrase search).. that is working. 
But artist_s:Dora the explorer is not working. Any way to make this 
artist_s:Dora the explorer to return results that contain this in them.
 
Thanks.



From: Ahmet Arslan [mailto:iori...@yahoo.com]
Sent: Tue 3/23/2010 9:32 AM
To: solr-user@lucene.apache.org
Subject: Re: Perfect Match




 I need help on one of my issues with perfect matching of
 terms.
 
 I have a collection of artists which are stored in the
 index against the field name artist_t which is a text type
 field. This field consists of values like [dora, Dora The
 Explorer, Princess Dora The explorer] across various docs
 as in
 
 doc
 field name=artist_tDora/field
 /doc
 doc
 field name=artist_tDora The
 Explorer/field
 /doc
 doc
 field name=artist_tPrincess Dora The
 Explorer/field
 /doc
 
 I am searching specifically on artist_t like
 q=artist_t:Dora.
 What I need is the one document which matches exactly with
 Dora, ie. the first doc. Dora the Explorer and Princess
 Dora The Explorer should not come along with it.
 
 But I am getting all the above.
 
 To tackle this problem, I tried to copyfield this artist_t
 to a new field called artist_s which is of type string and
 indexed the content again. But this approach also doesnt
 help.

with type=string q=artist_s:Dora should return only
doc
field name=artist_sDora/field
/doc

 I tried to create a new field type with Keyword Tokenizer.
 and tried to create a field of that type and copied artist_t
 to this field. That also doesnt work.

May be you have trailing white-spaces in your artists? Can you try with adding 
TrimFilterFactory after KeywordTokenizerFactory?

 Is there any way of doing this??
 
 I need exact match ie. if I search for artist_t:Dora The
 Explorer, I should get only the second doc and not the third
 one(Princess Dora The Explorer).

Note that q=artist_t:Dora The Explorer is parsed into artist_t:Dora 
defaultField:The defaultField:Explorer

Can you do your tests with q=artist_s:Dora?


 




RE: XML data in solr field

2010-03-17 Thread Nair, Manas
Thankyou Tommy. But the real problem here is that the xml is dynamic and the 
element names will be different in different docs which means that there will 
be a lot of field names to be added in schema if I were to index those xml 
nodes separately.
Is it possible to have nested indexing (xml within xml) in solr without the 
overhead of adding all those inner xml nodes as actual fields in solr schema?
 
Manas



From: Tommy Chheng [mailto:tommy.chh...@gmail.com]
Sent: Tue 3/16/2010 5:05 PM
To: solr-user@lucene.apache.org
Subject: Re: XML data in solr field




  Do you have the option of just importing each xml node as a
field/value when you add the document?

That'll let you do the search easily. If you need to store the raw XML,
you can use an extra field.

Tommy Chheng
Programmer and UC Irvine Graduate Student
Twitter @tommychheng
http://tommy.chheng.com http://tommy.chheng.com/ 


On 3/16/10 12:59 PM, Nair, Manas wrote:
 Hello Experts,

 I need help on this issue of mine. I am unsure if this scenario is possible.
 I have a field in my solr document namedinputxml, the value of which is a 
 xml string as below. This xml structure is within the inputxml field value. I 
 needed help on searching this xml structure i.e. if I search  for Venue, I 
 should get Radio City Music Hall as the result and not the complete tag 
 likeVenue value=Radio City Music Hall /. Is this supported in solr?? If 
 it is, how can this be implemented??

 root
 Venue value=Radio City Music Hall /
 Link value=http://bit.ly/Rndab; /
 LinkText value=En savoir + /
 Address value=New-York, USA /
 /root

 Any help is appreciated. I donot need the tag name in the result, instead I 
 need the tag value.

 Thanks in advance,
 Manas Nair





RE: Issue in search

2010-03-17 Thread Nair, Manas
You could write yourr query like
q=filedname1:searchValue AND fieldName2:value OR fieldName3: Value
 
Regards,
Manas



From: Suram [mailto:reactive...@yahoo.com]
Sent: Wed 3/17/2010 12:44 AM
To: solr-user@lucene.apache.org
Subject: Issue in search




In solr how can perform AND, OR, NOT search while querying the data
--
View this message in context: 
http://old.nabble.com/Issue-in-search-tp27927828p27927828.html
Sent from the Solr - User mailing list archive at Nabble.com.





XML data in solr field

2010-03-16 Thread Nair, Manas
Hello Experts,
 
I need help on this issue of mine. I am unsure if this scenario is possible.
I have a field in my solr document named inputxml, the value of which is a 
xml string as below. This xml structure is within the inputxml field value. I 
needed help on searching this xml structure i.e. if I search  for Venue, I 
should get Radio City Music Hall as the result and not the complete tag like 
Venue value=Radio City Music Hall /. Is this supported in solr?? If it is, 
how can this be implemented??
 
root
Venue value=Radio City Music Hall /
Link value=http://bit.ly/Rndab; /
LinkText value=En savoir + /
Address value=New-York, USA /
/root

Any help is appreciated. I donot need the tag name in the result, instead I 
need the tag value.
 
Thanks in advance,
Manas Nair


How to retrieve unique values in typeahead

2010-03-15 Thread Nair, Manas
Hi experts,
 
Please help me out on this.
 
I have a collection of about 30K documents which pertain to pop artists (eg. 
Madonna, Michael Jackson). These artist names are indexed in the field named 
artist_t which has the following properties in dynamic field declaration:
dynamicField name=*_t type=text indexed=true stored=true/

Most of the documents will have MJ as their artist. I am using EdgeNGram filter 
factory to get a typeahead implementation. i.e.

when I type in m I would get madonna, michael jackson, miley cyrus etc 
as results. The problem that I have now is that all these terms are repeated.

When I search for m, instead of madonna, michael jackson I am getting 
MJ repeated many times in the initiall 10 docs that solr brings by default.

I need to make all these artists unique i.e if I search m, I should get 
individual results just once?

How should I change the schema file and is there a query tweaking required?

Any help would be dearly appreciated.

Thanks and regards,

Manas



Auto Suggest with multiple space separated words

2010-01-29 Thread Nair, Manas
Hi Experts,
 
I need an auto suggest functionality using SOLR which gives me the feel of 
using the fire fox browser. In short, if I type in a prefix, the results should 
drop down even if the prefix is not the starting of the drop down items.
 
Example: If I search for Lin, then the results could be 
[Abe Lincoln, Lindsay Lohan, Sarah Palin, Gasoline .].
 
Please suggest the best approach.
 
Any help is greatly appreciated.
 
Thankyou,
Manas Nair


RE: Multi word synonym problem

2009-11-20 Thread Nair, Manas
Hi,
 
I tried using the recommended approach but to no benefit. The multiword 
synonyms are still not appearing in the result.
 
My schema.xml has the following fieldType:
 
 
fieldType name=text class=solr.TextField positionIncrementGap=100
  analyzer type=index
tokenizer class=solr.WhitespaceTokenizerFactory/
filter class=solr.SynonymFilterFactory synonyms=synonyms.txt 
ignoreCase=true expand=true/
filter class=solr.StopFilterFactory ignoreCase=true 
words=stopwords.txt/
filter class=solr.WordDelimiterFilterFactory generateWordParts=1 
generateNumberParts=1 catenateWords=1 catenateNumbers=1 catenateAll=0 
splitOnCaseChange=0/
filter class=solr.LowerCaseFilterFactory/
!--filter class=solr.EnglishPorterFilterFactory 
protected=protwords.txt/ --
filter class=solr.RemoveDuplicatesTokenFilterFactory/
  /analyzer
  analyzer type=query
tokenizer class=solr.WhitespaceTokenizerFactory/
filter class=solr.SynonymFilterFactory synonyms=synonyms.txt 
ignoreCase=true expand=false/
filter class=solr.StopFilterFactory ignoreCase=true 
words=stopwords.txt/
filter class=solr.WordDelimiterFilterFactory generateWordParts=1 
generateNumberParts=1 catenateWords=0 catenateNumbers=0 catenateAll=0 
splitOnCaseChange=0/
filter class=solr.LowerCaseFilterFactory/
!--filter class=solr.EnglishPorterFilterFactory 
protected=protwords.txt/ --
filter class=solr.RemoveDuplicatesTokenFilterFactory/
  /analyzer
/fieldType

This text field is the defaultSearchField too.
 
If I give the synonym for Micheal Jackson as Michael Jackson, i.e. in my 
synonyms.txt file, he entry is:
Micheal Jackson = Michael Jackson
 
The response is not searching for Michael Jackson. Instead it is searching for 
(text:Micheal and text: Jackson).To monitor the parsed query, i turned on 
debugQuery, but in the present case, the parsed query string was searching 
Micheal and Jackson separately.
 
I was able to somehow bring the corret response by modifying the synonyms.txt 
file. I changed the entry as:
Micheal Jackson , Michael Jackson  (replaced '=' with ',').
 
Is there something that needs to be done with the schema part that has been 
mentioned above. I would want the synonyms to work when I map them using =.
 
Kindly help.
 
Thankyou,
Manas


From: AHMET ARSLAN [mailto:iori...@yahoo.com]
Sent: Thu 11/12/2009 1:18 PM
To: solr-user@lucene.apache.org
Subject: Re: Multi word synonym problem



It is recommended [1] to use synonyms at index time only for various reasons 
especially with multi-word synonyms.

[1]http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.SynonymFilterFactory

only at index time use expand=true ingoreCase=true with synonym.txt :

micheal, michael

OR:

micheal jackson, michael jackson

Note it it is important to what filters you have before synonym filter.
Bu sure that you restart tomcat and re-index.

Query Micheal Jackson (not phrase search) should return the results
for Michael Jackson.

Hope this helps.

--- On Thu, 11/12/09, Nair, Manas manas.n...@mtvnmix.com wrote:

 From: Nair, Manas manas.n...@mtvnmix.com
 Subject: Multi word synonym problem
 To: solr-user@lucene.apache.org
 Cc: Arumugam, Senthil Kumar senthilkumar.arumu...@mtvncontractor.com
 Date: Thursday, November 12, 2009, 3:43 PM
 Hi Experts,
 
 I would like help on multi word synonyms. The scenario is
 like:
 
 I have a name Micheal Jackson(wrong term) which has a
 synonym Michael Jackson i.e.
 
 Micheal Jackson = Michael Jackson
 
 When I try to search for the word Micheal Jackson (not a
 phrase search), it is searching for text: Micheal , text:
 Jackson  and not for Michael Jackson.
 But when I search for Micheal Jackson (phrase search),
 solr is searching for Michael Jackson (the correct term).
 
 The schema.xml for the particular core contains the 
 SynonymFilterFactory for text analyzer and is enabled during
 index as well as query time. The  SynonymFilterFactory
 during index and query time has the parameter expand=true.
 
 Please help me as to how a multiword synonym can be made
 effective i.e I want a search for
 Micheal Jackson (not phrase search) to return the results
 for Michael Jackson.
 
 What should be done so that Micheal Jackson is considered
 as one search term instead of splitting it.
 
 Any help is greatly appreciated.
 
 Thankyou,
 Manas Nair



 




Multi word synonym problem

2009-11-12 Thread Nair, Manas
Hi Experts,
 
I would like help on multi word synonyms. The scenario is like:
 
I have a name Micheal Jackson(wrong term) which has a synonym Michael Jackson 
i.e.
 
Micheal Jackson = Michael Jackson
 
When I try to search for the word Micheal Jackson (not a phrase search), it is 
searching for text: Micheal , text: Jackson  and not for Michael Jackson.
But when I search for Micheal Jackson (phrase search), solr is searching for 
Michael Jackson (the correct term).
 
The schema.xml for the particular core contains the  SynonymFilterFactory for 
text analyzer and is enabled during index as well as query time. The  
SynonymFilterFactory during index and query time has the parameter expand=true.
 
Please help me as to how a multiword synonym can be made effective i.e I want a 
search for 
Micheal Jackson (not phrase search) to return the results for Michael Jackson.
 
What should be done so that Micheal Jackson is considered as one search term 
instead of splitting it.
 
Any help is greatly appreciated.
 
Thankyou,
Manas Nair