Thanks Otis,

I am a first time user of SOLR. I understood that my problem calls for a
redesign of the document structure. However using CatX and Cat-X-Score is
not simple because cat is not fixed set, number of values x can take is not
predetermined. However I think dynamic fields might be helpful. If you have
any insights please share.

thanks again.

umar

On 3/12/08, Otis Gospodnetic <[EMAIL PROTECTED]> wrote:
>
> Umar,
>
> The notion of "subfield" does not exist in Solr (or am I living under a
> rock?).
> Thus, <field name=cat> val 1 <field name="catrank> score1 </field>
> </field> doesn't really make sense.
>
> Keep those two (cat and catrank) as two distinct fields and I think you'll
> have what you are after.
>
>
> Otis
>
> --
> Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
>
> ----- Original Message ----
> From: Umar Shah <[EMAIL PROTECTED]>
> To: solr-user@lucene.apache.org
>
> Sent: Saturday, March 8, 2008 7:03:32 AM
> Subject: Re: ranking on Multivalued fields
>
> Hi Otis,
>
> thanks for the reply,
>
> consider a multivalued field name cat
> <doc>
> --other fields
>
> <field name=cat> val 1 <field name="catrank> score1 </field> </field>
> <field name=cat> val 2 <field name="catrank> score2 </field> </field>
> <field name=cat> val 3 <field name="catrank> score3 </field> </field>
> ......
>
> --other fields
>
> <doc>
>
> the query i have to use is
> q= cat:query-text; sort catrank desc
>
> get all the documents
> WITH field  cat HAVING  query-text
> AND order by catrank desc
>
> On 3/8/08, Otis Gospodnetic <[EMAIL PROTECTED]> wrote:
> >
> > Umar,
> >
> > I'm not sure what you mean by a "subfield", can you explain please?
> >
> > As for your second question, just add category:X to your query and
> you'll
> > get matches ordered/ranked by score by default.
> >
> > Otis
> >
> >
> > --
> > Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
> >
> >
> > ----- Original Message ----
> > From: Umar Shah <[EMAIL PROTECTED]>
> > To: solr-user@lucene.apache.org
> > Sent: Friday, March 7, 2008 1:17:35 AM
> > Subject: ranking on Multivalued fields
> >
> > Hi,
> >
> > I have a problem where i want to rank multivalued fields
> >
> > suppose a multivalued field "category" having associated subfield
> "score".
> > First Is it possible to have a subfield in the mutlivalued field?
> > Second I want to get the documents ranked with the highest score say for
> > the
> > category:X
> >
> > thanks
> > Umar Shah
> >
> >
> >
> >
>
>
>
>

Reply via email to