On Wed, Jan 20, 2010 at 9:47 PM, fredanthony <fredanth...@gmail.com> wrote:

>
> Hi, I have Solr setup to use a DataImportHandler with my database. In the
> data-config.xml file I have one document with two entities as follows:
>
>    <document>
>                <entity name="users"
>                        query="SELECT user_id, user_id as pk_field,
> user_name FROM users">
>                </entity>
>
>                <entity name="group"
>                        query="SELECT group_id, group_id as pk_field,
> group_name FROM  groups">
>                </entity>
>    </document>
>
> Now, my goal is I want certain queries to return back indexed items from a
> single entity. Im not sure if this is the right way to do it. Maybe I need
> multiple indexes? I just need to limit the results in certain sections, for
> example a user section to return only users and not groups and vice-versa.
>

You can add the type of document (user/group) to the document and then
filter on that e.g.

<field column="docType" template="group"/>


-- 
Regards,
Shalin Shekhar Mangar.

Reply via email to