lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexandre Rocco <alel...@gmail.com>
Subject Re: Storing RandomSortField
Date Wed, 19 May 2010 13:08:03 GMT
Leonardo,

I was able to use the feature with a dynamic field as pointed in the
documentation.
So, I was just curious to take a peek at the values that are generated, even
when the field is not dynamic, so I tried to figure out a way to do so.
Maybe some output when the debug query is enabled would be useful, but it
seems it's not implemented yet.
I will try to take a look at the classes and see what can I do about it.

Thanks!

On Wed, May 19, 2010 at 5:34 AM, Leonardo Menezes <
leonardo.menezess@googlemail.com> wrote:

> Hey,
>   for random sorting, random values are generated in runtime using the seed
> you passed as one of the parameters to generate the value, among other
> things. this way, if the value you use as seed is the same in different
> request, the sorting order should be the same. you could also, for debbuing
> purposes, edit the random sort field class and put some traces in there, so
> it could print the id of the document and the value generated for example.
> but the values wont be stored on the idx.
>
> cheers
>
> On Wed, May 19, 2010 at 10:00 AM, Marco Martinez <
> mmartinez@paradigmatecnologico.com> wrote:
>
> > Hi Alexandre,
> >
> > I am not totally sure about this, but the random sort field its only used
> > to
> > do a random sort on your searchs, and you will to pass differents values
> to
> > have differents sorts, so this only applies in the searchs, so no value
> is
> > indexed. You will find more information here:
> >
> >
> http://lucene.apache.org/solr/api/org/apache/solr/schema/RandomSortField.html
> >
> > Marco Martínez Bautista
> > http://www.paradigmatecnologico.com
> > Avenida de Europa, 26. Ática 5. 3ª Planta
> > 28224 Pozuelo de Alarcón
> > Tel.: 91 352 59 42
> >
> >
> > 2010/5/18 Alexandre Rocco <aleloco@gmail.com>
> >
> > > Hi guys,
> > >
> > > Is there any way to mak a RandomSortField be stored?
> > > I'm trying to do it for debugging purposes,
> > > My intention is to take a look at the values that are stored there to
> > > determine the sorting that is being applied to the results.
> > >
> > > I tried to make it a stored field as:
> > > <field name="randomorder" type="random" stored="true" />
> > >
> > > And also tried to create another text field, copying the result from
> the
> > > random field like this:
> > > <field name="randomorderdebug" type="text" indexed="true"
> stored="true"/>
> > > <copyField source="randomorder" dest="randomorderdebug"/>
> > >
> > > Neither of the approaches worked.
> > > Is there any restriction on this kind of field that prevents it from
> > being
> > > displayed in the results?
> > >
> > > Thanks,
> > > Alexandre
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message