Re: Can I combine standardtokenizer with solr.WordDelimiterFilterFactory?

2013-11-01 Thread Oussama Jilal

Yes you can and I don't see any reason why you should not

Le 01/11/2013 15:38, eShard a écrit :

Good morning,
Here's the issue:
I have and ID that consists of two letters and a number.
The whole user title looks like this: Lastname, Firstname (LA12345).
Now, with my current configuration, I can search for LA12345 and find the
user.
However, when I type in just the number I get zero results.
If I put a wildcard in (*12345) I find the correct record.
The problem is I changed that user title to use the
worddelimiterfitlerfactory and it seems to work.
However, I also copy that field into the text field which just uses the
standardtokenizer and I lose the ability to search for 12345 without a
wildcard.
My question is can (or should) I put the worddelimiterfactory in with the
standardtokenizer in the text field?
Or should I just use one or the other?
Thank you,




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Can-I-combine-standardtokenizer-with-solr-WordDelimiterFilterFactory-tp4098814.html
Sent from the Solr - User mailing list archive at Nabble.com.




Re: Boosting Documents

2013-05-23 Thread Oussama Jilal
Oh thank you Chris, this is much clearer, and thank you for updating the 
Wiki too.


On 05/22/2013 08:29 PM, Chris Hostetter wrote:

: NOTE: make sure norms are enabled (omitNorms=false in the schema.xml) for
: any fields where the index-time boost should be stored.
:
: In my case where I only need to boost the whole document (not a specific
: field), do I have to activate the  omitNorms=false  for all the fields
: in the schema ?

docBoost is really just syntactic sugar for a field boost on each field i
the document -- it's factored into the norm value for each field in the
document.  (I'll update the wiki to make this more clear)

If you do a query that doesn't utilize any field which has norms, then the
docBoost you specified when indexing the document never comes into play.


In general, doc boosts and field boosts, and the way they come into play
as part of the field norm is fairly inflexible, and (in my opinion)
antiquated.  A much better way of dealing with this type of problem is
also discussed in the section of the wiki you linked to.  Imeediately
below...

http://wiki.apache.org/solr/SolrRelevancyFAQ#index-time_boosts

...you'll find...

http://wiki.apache.org/solr/SolrRelevancyFAQ#Field_Based_Boosting


-Hoss




Re: Boosting Documents

2013-05-22 Thread Oussama Jilal

Thank you for your reply bbarani,

I can't do that because I want to boost some documents over others, 
independing of the query.


On 05/21/2013 05:41 PM, bbarani wrote:

Why don't you boost during query time?

Something like q=supermanqf=title^2 subject

You can refer: http://wiki.apache.org/solr/SolrRelevancyFAQ



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Boosting-Documents-tp4064955p4064966.html
Sent from the Solr - User mailing list archive at Nabble.com.




Re: Boosting Documents

2013-05-22 Thread Oussama Jilal

Thank you Sandeep,

I did post the document like that (a minor difference is that I did not 
add the boost to the field since I don't want to boost on specific 
field, I boosted the whole document 'doc boost=2.0  /doc'), 
but the issue is that everything in the queries results has the same 
score even if they had been indexed with different boosts, and I can't 
sort on another field since this is independent from any field value.


Any ideas ?

On 05/22/2013 10:30 AM, Sandeep Mestry wrote:

Hi Oussama,

This is explained very nicely on Solr Wiki..
http://wiki.apache.org/solr/SolrRelevancyFAQ#index-time_boosts
http://wiki.apache.org/solr/UpdateXmlMessages#Optional_attributes_for_.22add.22

All you need to do is something similar to below..

-

add  doc boost=2.5field name=employeeId05991/field
   field name=office boost=2.0Bridgewater/field  /doc/add


What is not clear from your message is whether you need better scoring or
better sorting. so, additionally, you can consider adding a secondary sort
parameter for the docs having the same score.
http://wiki.apache.org/solr/CommonQueryParameters#sort


HTH,
Sandeep


On 22 May 2013 09:21, Oussama Jilal jilal.ouss...@gmail.com wrote:


Thank you for your reply bbarani,

I can't do that because I want to boost some documents over others,
independing of the query.


On 05/21/2013 05:41 PM, bbarani wrote:


  Why don't you boost during query time?

Something like q=supermanqf=title^2 subject

You can refer: 
http://wiki.apache.org/solr/**SolrRelevancyFAQhttp://wiki.apache.org/solr/SolrRelevancyFAQ



--
View this message in context: http://lucene.472066.n3.**
nabble.com/Boosting-Documents-**tp4064955p4064966.htmlhttp://lucene.472066.n3.nabble.com/Boosting-Documents-tp4064955p4064966.html
Sent from the Solr - User mailing list archive at Nabble.com.







Re: Boosting Documents

2013-05-22 Thread Oussama Jilal
I don't know if this is the issue or not but, concidering this note from 
the wiki :


NOTE: make sure norms are enabled (omitNorms=false in the schema.xml) 
for any fields where the index-time boost should be stored.


In my case where I only need to boost the whole document (not a specific 
field), do I have to activate the  omitNorms=false  for all the 
fields in the schema ?




On 05/22/2013 10:41 AM, Oussama Jilal wrote:

Thank you Sandeep,

I did post the document like that (a minor difference is that I did 
not add the boost to the field since I don't want to boost on specific 
field, I boosted the whole document 'doc boost=2.0  /doc'), 
but the issue is that everything in the queries results has the same 
score even if they had been indexed with different boosts, and I can't 
sort on another field since this is independent from any field value.


Any ideas ?

On 05/22/2013 10:30 AM, Sandeep Mestry wrote:

Hi Oussama,

This is explained very nicely on Solr Wiki..
http://wiki.apache.org/solr/SolrRelevancyFAQ#index-time_boosts
http://wiki.apache.org/solr/UpdateXmlMessages#Optional_attributes_for_.22add.22 



All you need to do is something similar to below..

-

add  doc boost=2.5field name=employeeId05991/field
   field name=office boost=2.0Bridgewater/field /doc/add


What is not clear from your message is whether you need better 
scoring or
better sorting. so, additionally, you can consider adding a secondary 
sort

parameter for the docs having the same score.
http://wiki.apache.org/solr/CommonQueryParameters#sort


HTH,
Sandeep


On 22 May 2013 09:21, Oussama Jilal jilal.ouss...@gmail.com wrote:


Thank you for your reply bbarani,

I can't do that because I want to boost some documents over others,
independing of the query.


On 05/21/2013 05:41 PM, bbarani wrote:


  Why don't you boost during query time?

Something like q=supermanqf=title^2 subject

You can refer: 
http://wiki.apache.org/solr/**SolrRelevancyFAQhttp://wiki.apache.org/solr/SolrRelevancyFAQ




--
View this message in context: http://lucene.472066.n3.**
nabble.com/Boosting-Documents-**tp4064955p4064966.htmlhttp://lucene.472066.n3.nabble.com/Boosting-Documents-tp4064955p4064966.html 


Sent from the Solr - User mailing list archive at Nabble.com.









Re: Boosting Documents

2013-05-22 Thread Oussama Jilal
I don't know if this can help (since the document boost should be 
independent of any schema) but here is my schema :


   |?xml version=1.0 encoding=UTF-8?
   schema  name=  version=1.5
types
fieldType  name=string  class=solr.StrField  
sortMissingLast=true  /
fieldType  name=long  class=solr.TrieLongField  sortMissingLast=true  
precisionStep=0  positionIncrementGap=0  /
fieldType  name=text  class=solr.TextField  sortMissingLast=true  
omitNorms=true
analyzer  type=index
tokenizer  class=solr.KeywordTokenizerFactory  /
filter  class=solr.LowerCaseFilterFactory  /
filter  class=solr.EdgeNGramFilterFactory  
maxGramSize=255  /
/analyzer
analyzer  type=query
tokenizer  class=solr.KeywordTokenizerFactory  /
filter  class=solr.LowerCaseFilterFactory  /
/analyzer
/fieldType
/types
fields
field  name=Id  type=string  indexed=true  stored=true  
multiValued=false  required=true  /
field  name=Suggestion  type=text  indexed=true  stored=true  
multiValued=false  required=false  /
field  name=Type  type=string  indexed=true  stored=true  
multiValued=false  required=true  /
field  name=Sections  type=string  indexed=true  stored=true  
multiValued=true  required=false  /
field  name=_version_  type=long  indexed=true  
stored=true/
/fields
copyField  source=Id  dest=Suggestion  /
uniqueKeyId/uniqueKey
defaultSearchFieldSuggestion/defaultSearchField
   /schema|

My query is somthing like : Suggestion:Olive Oil.

The result is 9 documents, wich all has the same score 11.287682, even 
if they had been indexed with different boosts (I am sure of this).




On 05/22/2013 10:54 AM, Sandeep Mestry wrote:

I think that is applicable only for the field level boosting and not at
document level boosting.

Can you post your query, field definition and results you're expecting.

I am using index and query time boosting without any issues so far. also
which version of Solr you're using?


On 22 May 2013 10:44, Oussama Jilal jilal.ouss...@gmail.com wrote:


I don't know if this is the issue or not but, concidering this note from
the wiki :

NOTE: make sure norms are enabled (omitNorms=false in the schema.xml)
for any fields where the index-time boost should be stored.

In my case where I only need to boost the whole document (not a specific
field), do I have to activate the  omitNorms=false  for all the
fields in the schema ?




On 05/22/2013 10:41 AM, Oussama Jilal wrote:


Thank you Sandeep,

I did post the document like that (a minor difference is that I did not
add the boost to the field since I don't want to boost on specific field, I
boosted the whole document 'doc boost=2.0  /doc'), but the issue
is that everything in the queries results has the same score even if they
had been indexed with different boosts, and I can't sort on another field
since this is independent from any field value.

Any ideas ?

On 05/22/2013 10:30 AM, Sandeep Mestry wrote:


Hi Oussama,

This is explained very nicely on Solr Wiki..
http://wiki.apache.org/solr/**SolrRelevancyFAQ#index-time_**boostshttp://wiki.apache.org/solr/SolrRelevancyFAQ#index-time_boosts
http://wiki.apache.org/solr/**UpdateXmlMessages#Optional_**
attributes_for_.22add.22http://wiki.apache.org/solr/UpdateXmlMessages#Optional_attributes_for_.22add.22

All you need to do is something similar to below..

 -

 add  doc boost=2.5field name=employeeId05991/**field
field name=office boost=2.0Bridgewater/**field /doc/add


What is not clear from your message is whether you need better scoring or
better sorting. so, additionally, you can consider adding a secondary
sort
parameter for the docs having the same score.
http://wiki.apache.org/solr/**CommonQueryParameters#sorthttp://wiki.apache.org/solr/CommonQueryParameters#sort


HTH,
Sandeep


On 22 May 2013 09:21, Oussama Jilal jilal.ouss...@gmail.com wrote:

  Thank you for your reply bbarani,

I can't do that because I want to boost some documents over others,
independing of the query.


On 05/21/2013 05:41 PM, bbarani wrote:

Why don't you boost during query time?

Something like q=supermanqf=title^2 subject

You can refer: 
http://wiki.apache.org/solr/SolrRelevancyFAQhttp://wiki.apache.org/solr/**SolrRelevancyFAQ
http://wiki.**apache.org/solr/**SolrRelevancyFAQhttp://wiki.apache.org/solr/SolrRelevancyFAQ


--
View this message in context: http://lucene.472066.n3.**
nabble.com/Boosting-Documents-tp4064955p4064966.htmlhttp://nabble.com/Boosting-Documents-**tp4064955p4064966.html
http:**//lucene.472066.n3.nabble.com/**Boosting-Documents-**
tp4064955p4064966.htmlhttp

Re: Regular expression in solr

2013-05-22 Thread Oussama Jilal
You can write a regular expression query like this (you need to specify 
the regex between slashes / ) :


fieldName:/[rR]egular.*/

On 05/22/2013 10:51 AM, Sagar Chaturvedi wrote:

Hi,

How do we search based upon regular expressions in solr?

Regards,
Sagar



DISCLAIMER:
---
The contents of this e-mail and any attachment(s) are confidential and
intended
for the named recipient(s) only.
It shall not attach any liability on the originator or NEC or its
affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the
opinions of NEC or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. .
---




Re: Regular expression in solr

2013-05-22 Thread Oussama Jilal
I don't think so, it always worked for me without anything special, just 
try it and see :)


On 05/22/2013 11:26 AM, Sagar Chaturvedi wrote:

@Oussama Thank you for your reply. Is it as simple as that? I mean no 
additional settings required?

-Original Message-
From: Oussama Jilal [mailto:jilal.ouss...@gmail.com]
Sent: Wednesday, May 22, 2013 3:37 PM
To: solr-user@lucene.apache.org
Subject: Re: Regular expression in solr

You can write a regular expression query like this (you need to specify the 
regex between slashes / ) :

fieldName:/[rR]egular.*/

On 05/22/2013 10:51 AM, Sagar Chaturvedi wrote:

Hi,

How do we search based upon regular expressions in solr?

Regards,
Sagar



DISCLAIMER:
--
-
The contents of this e-mail and any attachment(s) are confidential and
intended for the named recipient(s) only.
It shall not attach any liability on the originator or NEC or its
affiliates. Any views or opinions presented in this email are solely
those of the author and may not necessarily reflect the opinions of
NEC or its affiliates.
Any form of reproduction, dissemination, copying, disclosure,
modification, distribution and / or publication of this message
without the prior written consent of the author of this e-mail is
strictly prohibited. If you have received this email in error please
delete it and notify the sender immediately. .
--
-




DISCLAIMER:
---
The contents of this e-mail and any attachment(s) are confidential and
intended
for the named recipient(s) only.
It shall not attach any liability on the originator or NEC or its
affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the
opinions of NEC or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. .
---




Re: Boosting Documents

2013-05-22 Thread Oussama Jilal
Yes I did debug it and there is nothing special about it, everything is 
treated the same,


My Solr version is 4.2

The copy field is used because the 2 field are of different types but 
only one value is indexed in them (so no multiValue is required and it 
works perfectly).




On 05/22/2013 11:18 AM, Sandeep Mestry wrote:

Did you use the debugQuery=true in solr console to see how the query is
being interpreted and the result calculation?

Also, I'm not sure but this copyfield directive seems a bit confusing to
me..
copyField  source=Id  dest=Suggestion  /
Because multiValued is false for Suggestion field so does that schema mean
Suggestion has value only from Id and not from any other input?

You haven't mentioned the version of Solr, can you also post the query
params?



On 22 May 2013 11:04, Oussama Jilal jilal.ouss...@gmail.com wrote:


I don't know if this can help (since the document boost should be
independent of any schema) but here is my schema :

|?xml version=1.0 encoding=UTF-8?
schema  name=  version=1.5
 types
 fieldType  name=string  class=solr.StrField
  sortMissingLast=true  /
 fieldType  name=long  class=solr.TrieLongField
  sortMissingLast=true  precisionStep=0  positionIncrementGap=0  /
 fieldType  name=text  class=solr.TextField
  sortMissingLast=true  omitNorms=true
 analyzer  type=index
 tokenizer  class=solr.**KeywordTokenizerFactory
  /
 filter  class=solr.**LowerCaseFilterFactory  /
 filter  class=solr.**EdgeNGramFilterFactory
  maxGramSize=255  /
 /analyzer
 analyzer  type=query
 tokenizer  class=solr.**KeywordTokenizerFactory
  /
 filter  class=solr.**LowerCaseFilterFactory  /
 /analyzer
 /fieldType
 /types
 fields
 field  name=Id  type=string  indexed=true
  stored=true  multiValued=false  required=true  /
 field  name=Suggestion  type=text  indexed=true
  stored=true  multiValued=false  required=false  /
 field  name=Type  type=string  indexed=true
  stored=true  multiValued=false  required=true  /
 field  name=Sections  type=string  indexed=true
  stored=true  multiValued=true  required=false  /
 field  name=_version_  type=long  indexed=true
  stored=true/
 /fields
 copyField  source=Id  dest=Suggestion  /
 uniqueKeyId/uniqueKey
 defaultSearchField**Suggestion/**defaultSearchField
/schema|

My query is somthing like : Suggestion:Olive Oil.

The result is 9 documents, wich all has the same score 11.287682, even
if they had been indexed with different boosts (I am sure of this).




On 05/22/2013 10:54 AM, Sandeep Mestry wrote:


I think that is applicable only for the field level boosting and not at
document level boosting.

Can you post your query, field definition and results you're expecting.

I am using index and query time boosting without any issues so far. also
which version of Solr you're using?


On 22 May 2013 10:44, Oussama Jilal jilal.ouss...@gmail.com wrote:

  I don't know if this is the issue or not but, concidering this note from

the wiki :

NOTE: make sure norms are enabled (omitNorms=false in the schema.xml)
for any fields where the index-time boost should be stored.

In my case where I only need to boost the whole document (not a specific
field), do I have to activate the  omitNorms=false  for all the
fields in the schema ?




On 05/22/2013 10:41 AM, Oussama Jilal wrote:

  Thank you Sandeep,

I did post the document like that (a minor difference is that I did not
add the boost to the field since I don't want to boost on specific
field, I
boosted the whole document 'doc boost=2.0  /doc'), but the
issue
is that everything in the queries results has the same score even if
they
had been indexed with different boosts, and I can't sort on another
field
since this is independent from any field value.

Any ideas ?

On 05/22/2013 10:30 AM, Sandeep Mestry wrote:

  Hi Oussama,

This is explained very nicely on Solr Wiki..
http://wiki.apache.org/solr/SolrRelevancyFAQ#index-time_boostshttp://wiki.apache.org/solr/**SolrRelevancyFAQ#index-time_**boosts
http://wiki.apache.org/**solr/SolrRelevancyFAQ#index-**time_boostshttp://wiki.apache.org/solr/SolrRelevancyFAQ#index-time_boosts
http://wiki.apache.org/solr/UpdateXmlMessages#Optional_**http://wiki.apache.org/solr/**UpdateXmlMessages#Optional_**
attributes_for_.22add.22http:**//wiki.apache.org/solr/**
UpdateXmlMessages#Optional_**attributes_for_.22add.22http://wiki.apache.org/solr/UpdateXmlMessages#Optional_attributes_for_.22add.22

All you need to do is something similar to below..

  -

  add  doc boost=2.5field name=employeeId05991

Re: Regular expression in solr

2013-05-22 Thread Oussama Jilal
I am not sure but I heard it works with the Java Regex engine (a little 
obvious if it is true ...), so any Java regex tutorial would help you.


On 05/22/2013 11:42 AM, Sagar Chaturvedi wrote:

Yes, it works for me too. But many times result is not as expected. Is there 
some guide on use of regex in solr?

-Original Message-
From: Oussama Jilal [mailto:jilal.ouss...@gmail.com]
Sent: Wednesday, May 22, 2013 4:00 PM
To: solr-user@lucene.apache.org
Subject: Re: Regular expression in solr

I don't think so, it always worked for me without anything special, just try it 
and see :)

On 05/22/2013 11:26 AM, Sagar Chaturvedi wrote:

@Oussama Thank you for your reply. Is it as simple as that? I mean no 
additional settings required?

-Original Message-
From: Oussama Jilal [mailto:jilal.ouss...@gmail.com]
Sent: Wednesday, May 22, 2013 3:37 PM
To: solr-user@lucene.apache.org
Subject: Re: Regular expression in solr

You can write a regular expression query like this (you need to specify the 
regex between slashes / ) :

fieldName:/[rR]egular.*/

On 05/22/2013 10:51 AM, Sagar Chaturvedi wrote:

Hi,

How do we search based upon regular expressions in solr?

Regards,
Sagar



DISCLAIMER:
-
-
-
The contents of this e-mail and any attachment(s) are confidential
and intended for the named recipient(s) only.
It shall not attach any liability on the originator or NEC or its
affiliates. Any views or opinions presented in this email are solely
those of the author and may not necessarily reflect the opinions of
NEC or its affiliates.
Any form of reproduction, dissemination, copying, disclosure,
modification, distribution and / or publication of this message
without the prior written consent of the author of this e-mail is
strictly prohibited. If you have received this email in error please
delete it and notify the sender immediately. .
-
-
-



DISCLAIMER:
--
-
The contents of this e-mail and any attachment(s) are confidential and
intended for the named recipient(s) only.
It shall not attach any liability on the originator or NEC or its
affiliates. Any views or opinions presented in this email are solely
those of the author and may not necessarily reflect the opinions of
NEC or its affiliates.
Any form of reproduction, dissemination, copying, disclosure,
modification, distribution and / or publication of this message
without the prior written consent of the author of this e-mail is
strictly prohibited. If you have received this email in error please
delete it and notify the sender immediately. .
--
-




DISCLAIMER:
---
The contents of this e-mail and any attachment(s) are confidential and
intended
for the named recipient(s) only.
It shall not attach any liability on the originator or NEC or its
affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the
opinions of NEC or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. .
---




Re: synonym indexing in solr

2013-05-22 Thread Oussama Jilal

Hello,

I think that what is written about the SynonymFilterFactory in the wiki 
is well explained, so I will direct you there :


http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.SynonymFilterFactory

On 05/22/2013 11:44 AM, Sagar Chaturvedi wrote:

Hi,

Since synonym searching has some limitations in solr, so I wanted to know the 
procedure of Synonym indexing in solr?
Please let me know if any guide is available for that.

Regards,
Sagar



DISCLAIMER:
---
The contents of this e-mail and any attachment(s) are confidential and
intended
for the named recipient(s) only.
It shall not attach any liability on the originator or NEC or its
affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the
opinions of NEC or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. .
---




Re: Boosting Documents

2013-05-22 Thread Oussama Jilal
Ok thank you for your help, I think I will have to treat the problem in 
another way even if it will complicate things for me.


thanks again

On 05/22/2013 11:51 AM, Sandeep Mestry wrote:

I'm running out of options now, can't really see the issue you're facing
unless the debug analysis is posted.
I think a thorough debugging is required from both application and solr
level.

If you want a customize scoring from Solr, you can also consider overriding
DefaultSimilarity implementation - but that'll be a separate issue.


On 22 May 2013 11:32, Oussama Jilal jilal.ouss...@gmail.com wrote:


Yes I did debug it and there is nothing special about it, everything is
treated the same,

My Solr version is 4.2

The copy field is used because the 2 field are of different types but only
one value is indexed in them (so no multiValue is required and it works
perfectly).




On 05/22/2013 11:18 AM, Sandeep Mestry wrote:


Did you use the debugQuery=true in solr console to see how the query is
being interpreted and the result calculation?

Also, I'm not sure but this copyfield directive seems a bit confusing to
me..
copyField  source=Id  dest=Suggestion  /
Because multiValued is false for Suggestion field so does that schema mean
Suggestion has value only from Id and not from any other input?

You haven't mentioned the version of Solr, can you also post the query
params?



On 22 May 2013 11:04, Oussama Jilal jilal.ouss...@gmail.com wrote:

  I don't know if this can help (since the document boost should be

independent of any schema) but here is my schema :

 |?xml version=1.0 encoding=UTF-8?
 schema  name=  version=1.5
  types
  fieldType  name=string  class=solr.StrField
   sortMissingLast=true  /
  fieldType  name=long  class=solr.TrieLongField
   sortMissingLast=true  precisionStep=0  positionIncrementGap=0  /
  fieldType  name=text  class=solr.TextField
   sortMissingLast=true  omitNorms=true
  analyzer  type=index
  tokenizer  class=solr.
KeywordTokenizerFactory
   /
  filter  class=solr.LowerCaseFilterFactory
  /
  filter  class=solr.
EdgeNGramFilterFactory

   maxGramSize=255  /
  /analyzer
  analyzer  type=query
  tokenizer  class=solr.
KeywordTokenizerFactory
   /
  filter  class=solr.LowerCaseFilterFactory
  /

  /analyzer
  /fieldType
  /types
  fields
  field  name=Id  type=string  indexed=true
   stored=true  multiValued=false  required=true  /
  field  name=Suggestion  type=text  indexed=true
   stored=true  multiValued=false  required=false  /
  field  name=Type  type=string  indexed=true
   stored=true  multiValued=false  required=true  /
  field  name=Sections  type=string  indexed=true
   stored=true  multiValued=true  required=false  /
  field  name=_version_  type=long  indexed=true
   stored=true/
  /fields
  copyField  source=Id  dest=Suggestion  /
  uniqueKeyId/uniqueKey
  defaultSearchFieldSuggestion/defaultSearchField

 /schema|

My query is somthing like : Suggestion:Olive Oil.

The result is 9 documents, wich all has the same score 11.287682, even
if they had been indexed with different boosts (I am sure of this).




On 05/22/2013 10:54 AM, Sandeep Mestry wrote:

  I think that is applicable only for the field level boosting and not at

document level boosting.

Can you post your query, field definition and results you're expecting.

I am using index and query time boosting without any issues so far. also
which version of Solr you're using?


On 22 May 2013 10:44, Oussama Jilal jilal.ouss...@gmail.com wrote:

   I don't know if this is the issue or not but, concidering this note
from


the wiki :

NOTE: make sure norms are enabled (omitNorms=false in the schema.xml)
for any fields where the index-time boost should be stored.

In my case where I only need to boost the whole document (not a
specific
field), do I have to activate the  omitNorms=false  for all the
fields in the schema ?




On 05/22/2013 10:41 AM, Oussama Jilal wrote:

   Thank you Sandeep,


I did post the document like that (a minor difference is that I did
not
add the boost to the field since I don't want to boost on specific
field, I
boosted the whole document 'doc boost=2.0  /doc'), but the
issue
is that everything in the queries results has the same score even if
they
had been indexed with different boosts, and I can't sort on another
field
since this is independent from any field value.

Any ideas ?

On 05/22/2013 10:30 AM, Sandeep Mestry wrote:

   Hi Oussama,


This is explained very nicely on Solr Wiki..
http://wiki.apache.org/solr

Re: Regular expression in solr

2013-05-22 Thread Oussama Jilal
There is no ^ or $ in the solr regex since the regular expression will 
match tokens (not the complete indexed text). So the results you get 
will basicly depend on your way of indexing, if you use the regex on a 
tokenized field and that is not what you want, try to use a copy field 
wich is not tokenized and then use the regex on that one.


On 05/22/2013 11:53 AM, Stéphane Habett Roux wrote:

I just can't get the $ endpoint to work.


I am not sure but I heard it works with the Java Regex engine (a little obvious 
if it is true ...), so any Java regex tutorial would help you.

On 05/22/2013 11:42 AM, Sagar Chaturvedi wrote:

Yes, it works for me too. But many times result is not as expected. Is there 
some guide on use of regex in solr?

-Original Message-
From: Oussama Jilal [mailto:jilal.ouss...@gmail.com]
Sent: Wednesday, May 22, 2013 4:00 PM
To: solr-user@lucene.apache.org
Subject: Re: Regular expression in solr

I don't think so, it always worked for me without anything special, just try it 
and see :)

On 05/22/2013 11:26 AM, Sagar Chaturvedi wrote:

@Oussama Thank you for your reply. Is it as simple as that? I mean no 
additional settings required?

-Original Message-
From: Oussama Jilal [mailto:jilal.ouss...@gmail.com]
Sent: Wednesday, May 22, 2013 3:37 PM
To: solr-user@lucene.apache.org
Subject: Re: Regular expression in solr

You can write a regular expression query like this (you need to specify the 
regex between slashes / ) :

fieldName:/[rR]egular.*/

On 05/22/2013 10:51 AM, Sagar Chaturvedi wrote:

Hi,

How do we search based upon regular expressions in solr?

Regards,
Sagar



DISCLAIMER:
-
-
-
The contents of this e-mail and any attachment(s) are confidential
and intended for the named recipient(s) only.
It shall not attach any liability on the originator or NEC or its
affiliates. Any views or opinions presented in this email are solely
those of the author and may not necessarily reflect the opinions of
NEC or its affiliates.
Any form of reproduction, dissemination, copying, disclosure,
modification, distribution and / or publication of this message
without the prior written consent of the author of this e-mail is
strictly prohibited. If you have received this email in error please
delete it and notify the sender immediately. .
-
-
-


DISCLAIMER:
--
-
The contents of this e-mail and any attachment(s) are confidential and
intended for the named recipient(s) only.
It shall not attach any liability on the originator or NEC or its
affiliates. Any views or opinions presented in this email are solely
those of the author and may not necessarily reflect the opinions of
NEC or its affiliates.
Any form of reproduction, dissemination, copying, disclosure,
modification, distribution and / or publication of this message
without the prior written consent of the author of this e-mail is
strictly prohibited. If you have received this email in error please
delete it and notify the sender immediately. .
--
-



DISCLAIMER:
---
The contents of this e-mail and any attachment(s) are confidential and
intended
for the named recipient(s) only.
It shall not attach any liability on the originator or NEC or its
affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the
opinions of NEC or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. .
---




Boosting Documents

2013-05-21 Thread Oussama Jilal

Hi everyone,

I have a small (I hope) issue, and I wish someone could point me to the 
right direction.


I have been indexing some documents using Solr 4.1 and specifying 
different boosts for different types of documents (boost for the whole 
document). But when searching, I noticed that the scores are the same 
for all of them and that affected the order (not what I wanted).


Does anyone, know if I have to configure something else or what ? I have 
been using Solr for quite some time (more than a year) but I never used 
the boosting feature.


Thanks.


Re: Paging and sorting in Solr

2013-04-18 Thread Oussama Jilal

I am sure it does the sorting first (since I always done that).

On 04/18/2013 02:49 PM, hassancrowdc wrote:

I have done paging using solr rows and start query attributes.

But now it shows me result with that is sorted page wise.
I meant if i have the following scenario:

rows=25start=0sort=manufacturer asc

It will give me first 25 matching results and then sort only those.

I want it to sort all the results first and then apply rows and start. How
can i do that?



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Paging-and-sorting-in-Solr-tp4057000.html
Sent from the Solr - User mailing list archive at Nabble.com.


--
Oussama Jilal



Re: Query with whitespace

2013-03-01 Thread Oussama Jilal

Didn't know ! thank you Shown :)

On 03/01/2013 09:23 PM, Shawn Heisey wrote:

On 3/1/2013 1:50 PM, Jilal Oussama wrote:
You can also specify in you schema that the default query operator is 
AND.


This is deprecated as of Solr 4.0, so I don't mention it.



--
Oussama Jilal



Re: Can't search words in quotes

2013-02-26 Thread Oussama Jilal
The pattern you are using in the PatternTokenizerFactory does not 
contain double quotes, so indexing the text The Promulgation of 
Universal Peace will results in the following tokens : The / 
Promulgation / of / Universal / Peace, that's why Peace will not match 
Peace.



On 02/26/2013 08:08 AM, Alex Cougarman wrote:

Hi. We have run into an interesting situation when searching for words that are 
within double-quotes in our documents. For example, when we enter the following 
search: promulgation AND peace

The document in question has this text exactly (with the double quotes): The 
Promulgation of Universal Peace
However, it finds and highlights the word Promulgation but not the word Peace
Here's the field's definition in our schema.xml:

 fieldType name=text_general class=solr.TextField 
positionIncrementGap=100
   analyzer type=index
 tokenizer class=solr.PatternTokenizerFactory 
pattern=[\s\.\?\!,:;]/
 filter class=solr.StopFilterFactory ignoreCase=true words=stopwords.txt 
enablePositionIncrements=true /
 filter class=solr.LowerCaseFilterFactory/
 filter class=solr.PorterStemFilterFactory/
   /analyzer
   analyzer type=query
 tokenizer class=solr.PatternTokenizerFactory 
pattern=[\s\.\?\!,:;]/
 filter class=solr.StopFilterFactory ignoreCase=true words=stopwords.txt 
enablePositionIncrements=true /
 filter class=solr.SynonymFilterFactory synonyms=synonyms.txt ignoreCase=true 
expand=true/
 filter class=solr.LowerCaseFilterFactory/
 filter class=solr.PorterStemFilterFactory/
   /analyzer
 /fieldType

Warm regards,
Alex Cougarman

Bahá'í World Centre
Haifa, Israel
Office: +972-4-835-8683
Cell: +972-54-241-4742
acoug...@bwc.orgmailto:acoug...@bwc.org




--
Oussama Jilal



Re: Get search results in the order of fields names searched

2013-02-26 Thread Oussama Jilal
I think this can be achieved by boosting the fields and then sorting by 
the score.


http://wiki.apache.org/solr/SolrRelevancyFAQ#Field_Based_Boosting

On 02/26/2013 01:55 PM, David Philip wrote:

Hi Team,

Is it possible to get search results  in the order of fields names set?

Ex: say,

- I have 3 fields : Author, Editors, Raw_text,
- User searched for keyword: John Hopkins,
- Search query is : q= (Author: John Hopkins OR Editors:John Hopkins
OR Raw_Text:John Hopkins)

Expected result:
Result should be returned such that it should first get all the documents
which had John hopkins in field author and then the documents which had
John Hopkins in Editors and then in documents which had John Hopkins in
Raw_text. So if keyword is there in the main field author, it should get
that document first followed by editor and raw text.


  result name=response numFound=3 start=0
doc
str name=AuthorJohn Hopkins/str
str name=Editorstest test test/str
str name=Raw_textMr. John Hopkins book/str
/doc
doc
str name=AuthorMicheal Ranold/str
str name=EditorsJohn Hopkins, Micheal, Martin/str
str name=Raw_textMicheal is the main author, John Hopkins is co-author
/str
/doc
doc
str name=AuthorFeymenn/str
str name=EditorsMicheal, Martin/str
str name=Raw_textJohn Hopkins/str
/doc
/result



--
Oussama Jilal



Re: Solr Grouping and empty fields

2013-02-25 Thread Oussama Jilal

Ok, Thank you all for precious help :)


On 02/24/2013 04:37 PM, Teun Duynstee wrote:

That would depend on your indexing setup. We have a custom application for
indexing, so we just make a value up. In our case a GUID (UUID). But I
imagine that you could also just copy your id field with a prefix. It
depends on your data and tools.
Teun
Op 24 feb. 2013 15:00 schreef Jilal Oussama jilal.ouss...@gmail.com het
volgende:


Oh this is a good one ! Thank you very much Teun (But I will have to ask
you how do you generate a unique value for the copy field when the original
one is empty? Do you do this manualy or solr can do it?)
And thanks again.
On Feb 24, 2013 12:11 PM, Teun Duynstee t...@duynstee.com wrote:


We had a comparable situation. We created an extra field and at index

time

copy the value if there is one and create a unique dummy value if there

is

none. We couldn't just make the initial field required, because it has a
meaning other than just a grouping key.
Teun
Op 22 feb. 2013 20:47 schreef Daniel Collins danwcoll...@gmail.com

het

volgende:


We had something similar to be fair, a cluster information field which

was

unfortunately optional, so all the documents that didn't have this

field

set grouped together.

It isn't Solr's fault, to be fair, we told it to group on the values of
field Z, null is a valid value and lots of documents have that value so
they all group together.  We got what we asked for :-)

Our solution was to make that field mandatory, and in our indexing
pipeline we will set that field to some unique value (same as the

document

key if necessary) if it isn't set already to ensure that every document

has

that field set appropriately.

-Original Message- From: Oussama Jilal
Sent: Friday, February 22, 2013 5:25 PM
To: solr-user@lucene.apache.org
Subject: Re: Solr Grouping and empty fields

OK I'm sorry if I did not explained well my need. I'll try to give a
better explanation.

What I have : Millions of documents that have a field X , another field
Y and another field Z which is not required (So it can be empty in some
documents and not in others).

What I want to do : Search for docs that have the field X equals
something and group them by field Z (so that only 1 document is

returned

for every field Z value), BUT I want documents who have field Z as

empty

to be included in the results (all of them), and sort the results by
field Y (so I can't separate the request into two requests).

I hope that this is clearer.


On 02/22/2013 03:59 PM, Jack Krupansky wrote:


What?!?! You want them grouped but not grouped together?? What on

earth

does that mean?! I mean, either they are included or they are not. All
results will be in some group, so where exactly do you want these not

to

be grouped together documents to be grouped? In any case, please

clarify

what your expectations really are.

-- Jack Krupansky
-Original Message- From: Oussama Jilal
Sent: Friday, February 22, 2013 7:17 AM
To: solr-user@lucene.apache.org
Subject: Re: Solr Grouping and empty fields

Thank you Johannes, but I want the documents having the field empty to
be included in the results, just not to be grouped together, and if I
understood your solution correctly, it will simply remove those
documents from the results (Note : The field values are very variable
and unknown to me).

On 02/22/2013 02:53 PM, Johannes Rodenwald wrote:


Hi Oussama,

If you have only a few distinct, unchanging values in the field that

you

group upon, you could implement a FilterQuery (query parameter fq)

and

add it to the query, allowing all valid values, but not an empty

field. For

example:

fq=my_grouping_string_field:( value_a OR value_b OR value_c OR

value_d

)

If you use SOLR 4.x, you should be able to group upon an integer

field,

allowing a range filter:
(I still work with 3.6 which can only group on string fields, so i

didnt

test this one)

fq=my_grouping_integer_field:[**1 TO *]

--
Johannes Rodenwald


- Ursprüngliche Mail -
Von: Oussama Jilal jilal.ouss...@gmail.com
An: solr-user@lucene.apache.org
Gesendet: Freitag, 22. Februar 2013 12:32:13
Betreff: Solr Grouping and empty fields

Hi,

I need to group some results in solr based on a field, but I don't

want

documents having that field empty to be grouped together, does anyone
know how to achieve that ?



--
Oussama Jilal




--
Oussama Jilal



Solr Grouping and empty fields

2013-02-22 Thread Oussama Jilal

Hi,

I need to group some results in solr based on a field, but I don't want 
documents having that field empty to be grouped together, does anyone 
know how to achieve that ?


--
Oussama Jilal



Re: Solr Grouping and empty fields

2013-02-22 Thread Oussama Jilal
Thank you Johannes, but I want the documents having the field empty to 
be included in the results, just not to be grouped together, and if I 
understood your solution correctly, it will simply remove those 
documents from the results (Note : The field values are very variable 
and unknown to me).


On 02/22/2013 02:53 PM, Johannes Rodenwald wrote:

Hi Oussama,

If you have only a few distinct, unchanging values in the field that you group upon, you 
could implement a FilterQuery (query parameter fq) and add it to the query, 
allowing all valid values, but not an empty field. For example:

fq=my_grouping_string_field:( value_a OR value_b OR value_c OR value_d )

If you use SOLR 4.x, you should be able to group upon an integer field, 
allowing a range filter:
(I still work with 3.6 which can only group on string fields, so i didnt test 
this one)

fq=my_grouping_integer_field:[1 TO *]

--
Johannes Rodenwald


- Ursprüngliche Mail -
Von: Oussama Jilal jilal.ouss...@gmail.com
An: solr-user@lucene.apache.org
Gesendet: Freitag, 22. Februar 2013 12:32:13
Betreff: Solr Grouping and empty fields

Hi,

I need to group some results in solr based on a field, but I don't want
documents having that field empty to be grouped together, does anyone
know how to achieve that ?



--
Oussama Jilal



Re: Solr Grouping and empty fields

2013-02-22 Thread Oussama Jilal
OK I'm sorry if I did not explained well my need. I'll try to give a 
better explanation.


What I have : Millions of documents that have a field X , another field 
Y and another field Z which is not required (So it can be empty in some 
documents and not in others).


What I want to do : Search for docs that have the field X equals 
something and group them by field Z (so that only 1 document is returned 
for every field Z value), BUT I want documents who have field Z as empty 
to be included in the results (all of them), and sort the results by 
field Y (so I can't separate the request into two requests).


I hope that this is clearer.


On 02/22/2013 03:59 PM, Jack Krupansky wrote:
What?!?! You want them grouped but not grouped together?? What on 
earth does that mean?! I mean, either they are included or they are 
not. All results will be in some group, so where exactly do you want 
these not to be grouped together documents to be grouped? In any 
case, please clarify what your expectations really are.


-- Jack Krupansky
-Original Message- From: Oussama Jilal
Sent: Friday, February 22, 2013 7:17 AM
To: solr-user@lucene.apache.org
Subject: Re: Solr Grouping and empty fields

Thank you Johannes, but I want the documents having the field empty to
be included in the results, just not to be grouped together, and if I
understood your solution correctly, it will simply remove those
documents from the results (Note : The field values are very variable
and unknown to me).

On 02/22/2013 02:53 PM, Johannes Rodenwald wrote:

Hi Oussama,

If you have only a few distinct, unchanging values in the field that 
you group upon, you could implement a FilterQuery (query parameter 
fq) and add it to the query, allowing all valid values, but not an 
empty field. For example:


fq=my_grouping_string_field:( value_a OR value_b OR value_c OR value_d )

If you use SOLR 4.x, you should be able to group upon an integer 
field, allowing a range filter:
(I still work with 3.6 which can only group on string fields, so i 
didnt test this one)


fq=my_grouping_integer_field:[1 TO *]

--
Johannes Rodenwald


- Ursprüngliche Mail -
Von: Oussama Jilal jilal.ouss...@gmail.com
An: solr-user@lucene.apache.org
Gesendet: Freitag, 22. Februar 2013 12:32:13
Betreff: Solr Grouping and empty fields

Hi,

I need to group some results in solr based on a field, but I don't want
documents having that field empty to be grouped together, does anyone
know how to achieve that ?





--
Oussama Jilal