Re: custom similary on a field not working

2013-03-21 Thread xavier jmlucjav
Damn...I was obfuscated seeing the 14 there...I had naively thought that term freq would not be stored in the doc, 1 would be stored, but I guess it still stores the real value and then applies custom similarity at query time. That means changing to a custom similarity does not need reindexing rig

Re: custom similary on a field not working

2013-03-21 Thread Chris Hostetter
: > public class NoTfSimilarity extends DefaultSimilarity { : > public float tf(float freq) { : > return freq > 0 ? 1.0f : 0.0f; : > } : > } ... : > But I still see tf=14 in my query?? ... : > 1.0 = tf(freq=14.0), with freq of: : >

Re: custom similary on a field not working

2013-03-21 Thread xavier jmlucjav
Steve, yes, as I already included (though maybe is not very visible) I have this before element: I can see explain info is indeed different, for example I have [] instead of [DefaultSimilarity] thanks On Thu, Mar 21, 2013 at 3:08 PM, Steve Rowe wrote: > Hi xavier, > > Have you set the glo

Re: custom similary on a field not working

2013-03-21 Thread Steve Rowe
Hi xavier, Have you set the global similarity to solr.SchemaSimilarityFactory? See . Steve On Mar 21, 2013, at 9:44 AM, xavier jmlucjav wrote: > Hi Felipe, > > I need to keep positions, that is why I cannot just use > omitTermFreqAndPositions

Re: custom similary on a field not working

2013-03-21 Thread xavier jmlucjav
Hi Felipe, I need to keep positions, that is why I cannot just use omitTermFreqAndPositions On Thu, Mar 21, 2013 at 2:36 PM, Felipe Lahti wrote: > Do you really need a custom similarity? > Did you try to put the attribute "omitTermFreqAndPositions" in your field? > > It could be: > > indexed="

Re: custom similary on a field not working

2013-03-21 Thread Felipe Lahti
Do you really need a custom similarity? Did you try to put the attribute "omitTermFreqAndPositions" in your field? It could be: http://wiki.apache.org/solr/SchemaXml On Thu, Mar 21, 2013 at 7:35 AM, xavier jmlucjav wrote: > I have the following setup: > > positionIncrementGap="100"