A10: title = Lucene in Action (LIA) A11: title = Lucene in Action Deux A12: title = Solr Flare in Action A13: title = Practical Perl erik tagged A10 with "lucene" A11 with "lucene","solr" A12 with "ruby","solrflare" A13 with yonik tagged A10 with A11 with "lucene","solr","excellent" A12 with "solr" A13 with "foo" |
Allow a user to tag a book
Allow a user to remove a tag from a book, or all instances of a tag they have used.
Remove all tags that were added by a specific user
Show number of books tagged with each tag, restricted by users current search results and filters.
Show number of books tagged tagged by each user.
When a user is tagging a book, allow them to type in the first few letters and then give a dropdown list of existing tags to choose from. Sort by tag popularity, optionally show counts.
Tag popularity: number of users using that tag, or number of books
with that tag? Either could work if necessary,
they are automatically shown "solr(2), solrflare(1)" (uses #books tagged)
they are automatically shown "solr(3), solrflare(1)" (uses #tag instances)
User selects an existing tag to narrow their search results by.
Any displayed results (including facet counts) must have all tags that
have been selected by the user.
Show all books a specific user tagged with a specific tag, or restrict search results by the same.
Allow the user to narrow their search results by typing in
a tag instead of selecting it from a list. When the user has typed
one or two letters, automatically pop up a list of tags starting
with that prefix. Optionally sort tags by number of books it applies to
in the current search results.
Restrict books to those tagged by a specific user.
Restrict *tags* to those of a specific user.
Restrict books to those tagged by a specific users.
When searching for a specific tag, increase the relevance of books that have more instances of that tag.
Restrict to tags added in the last year (or time period)
http://www.flickr.com/groups/api/discuss/72157594497877875
Add tags directly to the documents as a single user/tag token.
add to A10, field utag="~erik#lucene" // single token add to A10, field utag2="~erik","#lucene" // two tokens, added via copyField with a tokenizer that splits the original |
Alternative:
add to A10, field utag="erik#lucene" // or "erik lucene", single token add to A10, field user="erik" // via copyField add to A10, field tag="lucene" // via copyField |
The latter looks simpler, but the former allows phrase queries to match different components of a tag with a single query. A Lucene PhraseQuery across multiple fields would also work for the latter if this capability is needed.
To leverage Relevancy calculations, you'd include the tag as part of the regular fulltext search (q), vs. just adding it as a filter (fq).
If multiple users have tagged a document with "lucene", then that field's density for the term will be higher, so Relevancy will also tend to be higher. However, another document with only 1 tag, which happens to be 'lucene', will likely still rank higher than a heavily tagged document with only 40% of the tags equal to 'lucene', given Lucene's default relevancy formulas.
More advanced relevancy models would need more sophisticated implementations, for example perhaps a custom Similarity class.
remove A10.utag="~erik#lucene"
q="utag:~erik*", get set of documents, remove all tags starting with ~erik
q="title:lucene" facet.field=utag2 facet.prefix=#
q="title:lucene" facet.field=utag2 facet.prefix=~
fq=utag2:#solr
q=title:lucene facet.field=utag2 facet.prefix=#so
q=title:* fq=utag2:~erik
q=lucene fq=utag2:~erik facet.field=utag facet.prefix=~erik
q=utag2:#lucene
??? reserve another prefix for fields like time