lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From caman <ABoxForTheOtherSt...@gmail.com>
Subject Re: Document model suggestion
Date Tue, 15 Dec 2009 17:24:22 GMT

Shalin,

Thanks. much appreciated.
Question about: 
 "That is usually what people do. The hard part is when some documents are
shared across multiple users. "

What do you recommend when documents has to be shared across multiple users?
Can't I just multivalue a field with all the users who has access to the
document?


thanks

Shalin Shekhar Mangar wrote:
> 
> On Tue, Dec 15, 2009 at 7:26 AM, caman
> <ABoxForTheOtherStuff@gmail.com>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
>> SOLR.
>>
>>
> No problem. Welcome to Solr!
> 
> -- 
> Regards,
> Shalin Shekhar Mangar.
> 
> 

-- 
View this message in context: http://old.nabble.com/Document-model-suggestion-tp26784346p26798445.html
Sent from the Solr - User mailing list archive at Nabble.com.


Mime
View raw message