Well you are correct Erik that this is a database-ish thing try to achieve
in solr and unfortunately the sin :) had been committed by somebody else :)
and now we are running into relevancy issues.

Let me try to state the problem more casually.

1. There are user records of type A, B, C etc. (userId field in index is
common to all records)
2. A user can have any number of A, B, C etc (e.g. think of A being a
language then user can know many languages like french, english, german etc)
3. Records are currently stored as a document in index.
4. A given query can match multiple records for the user
5. If for a user more records are matched (e.g. if he knows both french and
german) then he is more relevant and should come top in UI. This is the
reason I wanted to add lucene scores assuming the greater score means more
relevance.

Hope you got what I was saying.

Another idea for this situation is doing faceting on userId field and then
add the score but currently I think lucene only support facet count,
basically solr will give you only count of docs it matched. Can I get sum of
the score of documents that matched?


Thanks
Bharat Jain


On Tue, Jul 27, 2010 at 5:58 AM, Erick Erickson <erickerick...@gmail.com>wrote:

> I'm having trouble getting my head around what you're trying to accomplish,
> so if this is off base you know why <G>.
>
> But what it smells like is that you're trying to do database-ish things in
> a SOLR index, which is almost always the wrong approach. Is there a
> way to index redundant data with each document so all you have to do
> to get the "relevant" users is a simple query?
>
> Adding scores is also suspect.. I don't see how that does predictable
> things.
>
> But I'm also failing completely to understand what a "relevant" user is.
>
> not much help, if this is way off base perhaps you could provide some
> additional use-cases?
>
> Best
> Erick
>
> On Mon, Jul 26, 2010 at 2:37 AM, Bharat Jain <bharat.j...@gmail.com>
> wrote:
>
> > Hello All,
> >
> > I have a index which store multiple objects belonging to a user
> >
> > for e.g.
> > <schema>
> >  <field name="objType" type="..." />         ---------> Identifies user
> > object type e.g. userBasic or userAdv
> >
> >  <!-- obj 1 -->
> >  <field name="first_name" type="..." />  ----> MAPS to
> userBasicInfoObject
> >  <field name="last_name" type="..." />
> >
> >  <!-- obj 2 -->
> >  <field name="user_data_1" type="..." /> -----> MAPS to userAdvInfoObject
> >  <field name="user_data_2" type="..." />
> >
> > </schema>
> >
> >
> > Now when I am doing some query I get multiple records mapping to java
> > objects (identified by objType) that belong to the same user.
> >
> >
> > Now I want to show the relevant users at the top of the list. I am
> thinking
> > of adding the Lucene scores of different result documents to get the best
> > scores. Is this correct approach to get the relevance of the user?
> >
> > Thanks
> > Bharat Jain
> >
>

Reply via email to