Could you please tell me schema.xml "fields" tag content for such case?
Currently index data is something like this:

PageID BookID Text
1         1        "some text"
2         1        "some text"
3         1        "some text"
4         1        "some text"
5         2        "some text"
6         2        "some text"
7         2        "some text"
8         2        "some text"

when i make a simple query for the word "some" on Text field, i will have
all 8 rows returned. but i want to list only 2 items (Books with IDs 1 and
2)

I am also considering to concatenate Text columns and have the index like
this:

BookID     PageTexts
1             "some text some text some text...."
2             "some text some text some text...."

I wonder which index structure is better.


 

lee carroll wrote:
> 
> It really does depend upon what you want to do in your app but from
> the info given I'd go for denormalizing by repeating the least number
> of values. So in your case that would be book
> 
> PageID+BookID(uniqueKey), pageID, PageVal1, PageValn, BookID, BookName
> 
> 
> 
> 
> On 10 August 2011 09:46, directorscott <dgul...@gmail.com> wrote:
>> Hello,
>>
>> First of all, I am a beginner and i am trying to develop a sample
>> application using SolrNet.
>>
>> I am struggling about schema definition i need to use to correspond my
>> needs. In database, i have Books(bookId, name) and Pages(pageId, bookId,
>> text) tables. They have master-detail relationship. I want to be able to
>> search in Text area of Pages but list the books. Should i use a schema
>> for
>> Pages (with pageid as unique key) or for Books (with bookId as unique
>> key)
>> in this scenario?
>>
>> Thanks.
>>
>>
>>
>> --
>> View this message in context:
>> http://lucene.472066.n3.nabble.com/document-indexing-tp3241832p3241832.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
> 


--
View this message in context: 
http://lucene.472066.n3.nabble.com/document-indexing-tp3241832p3242219.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to