lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shalin Shekhar Mangar <>
Subject Re: Document model suggestion
Date Tue, 15 Dec 2009 09:07:10 GMT
On Tue, Dec 15, 2009 at 7:26 AM, caman <>wrote:

> Appreciate any guidance here please. Have a master-child table between two
> tables 'TA' and 'TB' where form is the master table. Any row in TA can have
> multiple row in TB.
> e.g. row in TA
> id---name
> 1---tweets
> TB:
> id|ta_id|field0|field1|field2.....|field20|created_by
> 1|1|value1|value2|value2.....|value20|User1
> <snip/>

> This works fine and index the data.But all the data for a row in TA gets
> combined in one document(not desirable).
> I am not clear on how to
> 1) separate a particular row from the search results.
> e.g. If I search for 'Android' and there are 5 rows for android in TB for a
> particular instance in TA, would like to show them separately to user and
> if
> the user click on any of the row,point them to an attached URL in the
> application. Should a separate index be maintained for each row in TB?TB
> can
> have millions of rows.

The easy answer is that whatever you want to show as results should be the
thing that you index as documents. So if you want to show tweets as results,
one document should represent one tweet.

Solr is different from relational databases and you should not think about
both the same way. De-normalization is the way to go in Solr.

> 2) How to protect one user's data from another user. I guess I can keep a
> column for a user_id in the schema and append that filter automatically
> when
> I search through SOLR. Any better alternatives?
That is usually what people do. The hard part is when some documents are
shared across multiple users.

> Bear with me if these are newbie questions please, this is my first day
> with
No problem. Welcome to Solr!

Shalin Shekhar Mangar.

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