Re: Wildcard query vs facet.prefix for autocomplete?

2012-07-18 Thread Erick Erickson
Well, option 2 won't do you any good, so speed doesn't really matter.
Your response would have a facet count for dam, all by itself, something like

int name=damned2/int
int name=dame1/int

etc.

which does not contain anything that lets you reconstruct the title
for autosuggest.

Best
Erick

On Tue, Jul 17, 2012 at 3:18 AM, santamaria2 aravinda@contify.com wrote:
 I'll consider using the other methods, but I'd like to know which would be
 faster among the two approaches mentioned in my opening post.

 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/Wildcard-query-vs-facet-prefix-for-autocomplete-tp3995199p3995458.html
 Sent from the Solr - User mailing list archive at Nabble.com.


Re: Wildcard query vs facet.prefix for autocomplete?

2012-07-18 Thread santamaria2
Well silly me... you're right.

On Wed, Jul 18, 2012 at 6:44 PM, Erick Erickson [via Lucene] 
ml-node+s472066n399570...@n3.nabble.com wrote:

 Well, option 2 won't do you any good, so speed doesn't really matter.
 Your response would have a facet count for dam, all by itself, something
 like

 int name=damned2/int
 int name=dame1/int

 etc.

 which does not contain anything that lets you reconstruct the title
 for autosuggest.

 Best
 Erick

 On Tue, Jul 17, 2012 at 3:18 AM, santamaria2 [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=3995706i=0
 wrote:
  I'll consider using the other methods, but I'd like to know which would
 be
  faster among the two approaches mentioned in my opening post.
 
  --
  View this message in context:
 http://lucene.472066.n3.nabble.com/Wildcard-query-vs-facet-prefix-for-autocomplete-tp3995199p3995458.html

  Sent from the Solr - User mailing list archive at Nabble.com.


 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://lucene.472066.n3.nabble.com/Wildcard-query-vs-facet-prefix-for-autocomplete-tp3995199p3995706.html
  To unsubscribe from Wildcard query vs facet.prefix for autocomplete?, click
 herehttp://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3995199code=YXJhdmluZGEucmFvQGNvbnRpZnkuY29tfDM5OTUxOTl8MTgyMTM4MDg2OQ==
 .
 NAMLhttp://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Wildcard-query-vs-facet-prefix-for-autocomplete-tp3995199p3995707.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Wildcard query vs facet.prefix for autocomplete?

2012-07-18 Thread Erick Erickson
But I did run across an idea a while ago... Either with a custom
update processor
or on the client side, you permute the title so you index something like:
Shadows of the Damned
of the DamnedShadows
the DamnedShadows of
DamnedShadows of the

Index these with KeywordTokenizer and LowercaseFilter.

Now, your responses from TermComponent (prefix) contain the entire
string and you can display them correctly by rearranging the string
at the client side based on the  (or whatever delimiter). Still an issue
with proper capitalization though since TermsComponent only
looks at the actual indexed data and it'll be lower-cased. You could
use String, but then you're counting on the user to capitalize properly, always
a dicey call.

And TermsComponent is very fast

FWIW
Erick

On Wed, Jul 18, 2012 at 9:21 AM, santamaria2 aravinda@contify.com wrote:
 Well silly me... you're right.

 On Wed, Jul 18, 2012 at 6:44 PM, Erick Erickson [via Lucene] 
 ml-node+s472066n399570...@n3.nabble.com wrote:

 Well, option 2 won't do you any good, so speed doesn't really matter.
 Your response would have a facet count for dam, all by itself, something
 like

 int name=damned2/int
 int name=dame1/int

 etc.

 which does not contain anything that lets you reconstruct the title
 for autosuggest.

 Best
 Erick

 On Tue, Jul 17, 2012 at 3:18 AM, santamaria2 [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=3995706i=0
 wrote:
  I'll consider using the other methods, but I'd like to know which would
 be
  faster among the two approaches mentioned in my opening post.
 
  --
  View this message in context:
 http://lucene.472066.n3.nabble.com/Wildcard-query-vs-facet-prefix-for-autocomplete-tp3995199p3995458.html

  Sent from the Solr - User mailing list archive at Nabble.com.


 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://lucene.472066.n3.nabble.com/Wildcard-query-vs-facet-prefix-for-autocomplete-tp3995199p3995706.html
  To unsubscribe from Wildcard query vs facet.prefix for autocomplete?, click
 herehttp://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3995199code=YXJhdmluZGEucmFvQGNvbnRpZnkuY29tfDM5OTUxOTl8MTgyMTM4MDg2OQ==
 .
 NAMLhttp://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml



 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/Wildcard-query-vs-facet-prefix-for-autocomplete-tp3995199p3995707.html
 Sent from the Solr - User mailing list archive at Nabble.com.


Re: Wildcard query vs facet.prefix for autocomplete?

2012-07-18 Thread santamaria2
Very interesting! Thanks for sharing, I'll ponder on it.


--
View this message in context: 
http://lucene.472066.n3.nabble.com/Wildcard-query-vs-facet-prefix-for-autocomplete-tp3995199p3995899.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Wildcard query vs facet.prefix for autocomplete?

2012-07-17 Thread santamaria2
I'll consider using the other methods, but I'd like to know which would be
faster among the two approaches mentioned in my opening post.

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Wildcard-query-vs-facet-prefix-for-autocomplete-tp3995199p3995458.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Wildcard query vs facet.prefix for autocomplete?

2012-07-16 Thread Pawel Rog
Maybe try EdgeNgramFilterFactory
http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters/#solr.EdgeNGramFilterFactory


On Mon, Jul 16, 2012 at 6:57 AM, santamaria2 aravinda@contify.comwrote:

 I'm about to implement an autocomplete mechanism for my search box. I've
 read
 about some of the common approaches, but I have a question about wildcard
 query vs facet.prefix.

 Say I want autocomplete for a title: 'Shadows of the Damned'. I want this
 to
 appear as a suggestion if I type 'sha' or 'dam' or 'the'. I don't care that
 it won't appear if I type 'hadows'.

 While indexing, I'd use a whitespace tokenizer and a lowercase filter to
 store that title in the index.
 Now I'm thinking two approaches for 'dam' typed in the search box:

 1) q=title:dam*

 2) q=*:*facet=onfacet.field=titlefacet.prefix=dam


 So any reason that I should favour one over the other? Speed a factor? The
 index has around 200,000 items.

 --
 View this message in context:
 http://lucene.472066.n3.nabble.com/Wildcard-query-vs-facet-prefix-for-autocomplete-tp3995199.html
 Sent from the Solr - User mailing list archive at Nabble.com.



Re: Wildcard query vs facet.prefix for autocomplete?

2012-07-16 Thread solrman
term component will be faster.
like below:
http://host:port/solr/terms?terms.fl=contentterms.prefix=sol

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Wildcard-query-vs-facet-prefix-for-autocomplete-tp3995199p3995378.html
Sent from the Solr - User mailing list archive at Nabble.com.


Wildcard query vs facet.prefix for autocomplete?

2012-07-15 Thread santamaria2
I'm about to implement an autocomplete mechanism for my search box. I've read
about some of the common approaches, but I have a question about wildcard
query vs facet.prefix.

Say I want autocomplete for a title: 'Shadows of the Damned'. I want this to
appear as a suggestion if I type 'sha' or 'dam' or 'the'. I don't care that
it won't appear if I type 'hadows'. 

While indexing, I'd use a whitespace tokenizer and a lowercase filter to
store that title in the index.
Now I'm thinking two approaches for 'dam' typed in the search box:

1) q=title:dam*

2) q=*:*facet=onfacet.field=titlefacet.prefix=dam


So any reason that I should favour one over the other? Speed a factor? The
index has around 200,000 items.

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Wildcard-query-vs-facet-prefix-for-autocomplete-tp3995199.html
Sent from the Solr - User mailing list archive at Nabble.com.