Probably you want to use
- multivalued field 'authors'
<add>
  <doc
    <field name="filename">login.php</field>
    <field name="authors">alex</field>
    <field name="authors">brian</field>
    ...
  </doc>
</add>
- return facets for this field
- you can filter unwanted authors whether during indexing process or post
process returned search results

On Fri, Oct 2, 2009 at 4:35 PM, Shalin Shekhar Mangar <
shalinman...@gmail.com> wrote:

> On Thu, Oct 1, 2009 at 7:37 PM, matrix_psj <matrix_...@hotmail.com> wrote:
>
> >
> >
> > An example:
> > My schema is about web files. Part of the syntax is a text field of
> authors
> > that have worked on each file, e.g.
> > <file>
> >    <filename>login.php</filename>
> >   <lastModDate>2009-01-01</lastModDate>
> >   <authors>alex, brian, carl carlington, dave alpha, eddie, dave
> > beta</authors>
> > </file>
> >
> > When I perform a search and get 20 web files back, I would like a facet
> of
> > the individual authors, but only if there name appears in a
> > public_authors.txt file.
> >
> > So if the public_authors.txt file contained:
> > Anna,
> > Bob,
> > Carl Carlington,
> > Dave Alpha,
> > Elvis,
> > Eddie,
> >
> > The facet returned would be:
> > Carl Carlington
> > Dave Alpha
> > Eddie
> >
> >
> >
> > Not sure if that makes sense? If it does, could someone explain to me the
> > schema fieldtype declarations that would bring back this sort of results.
> >
> >
> If I'm understanding you correctly - You want to facet on a field (with
> facet=true&facet.field=authors) but you want to show only certain
> whitelisted facet values in the response.
>
> If that is correct then, you can remove the authors which are not in the
> whitelist during indexing time. You can do this by adding
> KeepWordFilterFactory to your field type:
>
> <filter class="solr.KeepWordFilterFactory" words="author_whitelist.txt"
> ignoreCase="true" />
>
> --
> Regards,
> Shalin Shekhar Mangar.
>

Reply via email to