On 5/22/06, Nick Snels <[EMAIL PROTECTED]> wrote:
Thanks for the answer. I don't quit get how to make a compound key (but I'll
give it a try). I have multiple tables with an id, but if I put all of them
in a Solr index, the id isn't a unique field.

You have the "different type of documents in the same index" scenario.
If unique key field values for different tables overlap, you can
manipluate them so they don't... for example prepending the table name
to the id.

So instead of having
 {movie_id="42", title="Titanic"}
 {book_id="42", title="A Game of Thrones"}
You could have
 {id="movie_42", title="Titanic"}
 {id="book_42", title="A Game of Thrones"}


<copyField source="id" dest="key"/>
<copyField source="table" dest="key"/>

That won't work... unique key fields should only have a single value.
copyField used like this puts multiple values into a single field.


-Yonik

Reply via email to