Unknown query parser 'terms' with TermsComponent defined

2015-08-25 Thread P Williams
Hi,

We've encountered a strange situation, I'm hoping someone might be able to
shed some light. We're using Solr 4.9 deployed in Tomcat 7.

We build a query that has these params:

'params'={
  'fl'='id',
  'sort'='system_create_dtsi asc',
  'indent'='true',
  'start'='0',
  'q'='_query_:{!raw f=has_model_ssim}Batch AND ({!terms
f=id}ft849m81z)',
  'qt'='standard',
  'wt'='ruby',
  'rows'=['1',
'1000']}},

And it responds with an error message
'error'={

'msg'='Unknown query parser \'terms\'',
'code'=400}}

The terms component is defined in solrconfig.xml:

  searchComponent name=termsComponent class=solr.TermsComponent /

  requestHandler name=/terms class=solr.SearchHandler
lst name=defaults
  bool name=termstrue/bool
/lst
arr name=components
  strtermsComponent/str
/arr
  /requestHandler

And the Standard Response Handler is defined:
requestHandler name=standard class=solr.SearchHandler lst name=
defaults str name=echoParamsexplicit/str str name=defTypelucene
/str /lst /requestHandler

In case its useful, we have
luceneMatchVersion4.9/luceneMatchVersion

Why would we be getting the Unknown query parser \'terms\' error?

Thanks,
Tricia


Re: Unknown query parser 'terms' with TermsComponent defined

2015-08-25 Thread Chris Hostetter

1) The terms Query Parser (TermsQParser) has nothing to do with the 
TermsComponent (the first is for quering many distinct terms, the 
later is for requesting info about low level terms in your index)

https://cwiki.apache.org/confluence/display/solr/Other+Parsers#OtherParsers-TermsQueryParser
https://cwiki.apache.org/confluence/display/solr/The+Terms+Component

2) TermsQParser (which is what you are trying to use with the {!terms... 
query syntax) was not added to Solr until 4.10

3) based on your example query, i'm pretty sure what you want is the 
TermQParser: term (singular, no s) ...

https://cwiki.apache.org/confluence/display/solr/Other+Parsers#OtherParsers-TermQueryParser

{!term f=id}ft849m81z


: We've encountered a strange situation, I'm hoping someone might be able to
: shed some light. We're using Solr 4.9 deployed in Tomcat 7.
...
:   'q'='_query_:{!raw f=has_model_ssim}Batch AND ({!terms
f=id}ft849m81z)',
...
: 'msg'='Unknown query parser \'terms\'',
: 'code'=400}}

...

: The terms component is defined in solrconfig.xml:
: 
:   searchComponent name=termsComponent class=solr.TermsComponent /

-Hoss
http://www.lucidworks.com/


Re: Unknown query parser 'terms' with TermsComponent defined

2015-08-25 Thread P Williams
Thanks Hoss! It's obvious what the problem(s) are when you lay it all out
that way.

On Tue, Aug 25, 2015 at 12:14 PM, Chris Hostetter hossman_luc...@fucit.org
wrote:


 1) The terms Query Parser (TermsQParser) has nothing to do with the
 TermsComponent (the first is for quering many distinct terms, the
 later is for requesting info about low level terms in your index)


 https://cwiki.apache.org/confluence/display/solr/Other+Parsers#OtherParsers-TermsQueryParser
 https://cwiki.apache.org/confluence/display/solr/The+Terms+Component

 2) TermsQParser (which is what you are trying to use with the {!terms...
 query syntax) was not added to Solr until 4.10

 3) based on your example query, i'm pretty sure what you want is the
 TermQParser: term (singular, no s) ...


 https://cwiki.apache.org/confluence/display/solr/Other+Parsers#OtherParsers-TermQueryParser

 {!term f=id}ft849m81z


 : We've encountered a strange situation, I'm hoping someone might be able
 to
 : shed some light. We're using Solr 4.9 deployed in Tomcat 7.
 ...
 :   'q'='_query_:{!raw f=has_model_ssim}Batch AND ({!terms
 f=id}ft849m81z)',
 ...
 : 'msg'='Unknown query parser \'terms\'',
 : 'code'=400}}

 ...

 : The terms component is defined in solrconfig.xml:
 :
 :   searchComponent name=termsComponent class=solr.TermsComponent /

 -Hoss
 http://www.lucidworks.com/



TermsComponent/SolrCloud

2012-11-22 Thread Federico Méndez
Anyone knows if the TermsComponent supports distributed search trough a
SolrCloud installation? I have a SolrCloud installation that works OK for
regular searches but TermsComponent is returning empty results when using:
[collectionName]/terms?terms.fl=collector_nameterms.prefix=jo, the request
handler configuration is:
!-- A request handler for demonstrating the terms component --
  requestHandler name=/terms class=solr.SearchHandler startup=lazy
 lst name=defaults
  bool name=termstrue/bool
  bool name=distribtrue/bool
/lst
arr name=components
  strterms/str
/arr
  /requestHandler


Re: TermsComponent/SolrCloud

2012-11-22 Thread Tomás Fernández Löbbe
Hi Federico, it should work. Make sure you set the shards.qt parameter
too (in your case, it should be shards.qt=/terms)


On Thu, Nov 22, 2012 at 6:51 AM, Federico Méndez federic...@gmail.comwrote:

 Anyone knows if the TermsComponent supports distributed search trough a
 SolrCloud installation? I have a SolrCloud installation that works OK for
 regular searches but TermsComponent is returning empty results when using:
 [collectionName]/terms?terms.fl=collector_nameterms.prefix=jo, the request
 handler configuration is:
 !-- A request handler for demonstrating the terms component --
   requestHandler name=/terms class=solr.SearchHandler startup=lazy
  lst name=defaults
   bool name=termstrue/bool
   bool name=distribtrue/bool
 /lst
 arr name=components
   strterms/str
 /arr
   /requestHandler



Re: TermsComponent/SolrCloud

2012-11-22 Thread Federico Méndez
Thanks Tomas, your suggestion worked!!

requestHandler name=/terms class=solr.SearchHandler startup=lazy
 lst name=defaults
  bool name=termstrue/bool
  bool name=distribtrue/bool
  str name=shards.qt/terms/str
/lst
arr name=components
  strterms/str
/arr
  /requestHandler


On Thu, Nov 22, 2012 at 11:59 AM, Tomás Fernández Löbbe 
tomasflo...@gmail.com wrote:

 Hi Federico, it should work. Make sure you set the shards.qt parameter
 too (in your case, it should be shards.qt=/terms)


 On Thu, Nov 22, 2012 at 6:51 AM, Federico Méndez federic...@gmail.com
 wrote:

  Anyone knows if the TermsComponent supports distributed search trough a
  SolrCloud installation? I have a SolrCloud installation that works OK for
  regular searches but TermsComponent is returning empty results when
 using:
  [collectionName]/terms?terms.fl=collector_nameterms.prefix=jo, the
 request
  handler configuration is:
  !-- A request handler for demonstrating the terms component --
requestHandler name=/terms class=solr.SearchHandler
 startup=lazy
   lst name=defaults
bool name=termstrue/bool
bool name=distribtrue/bool
  /lst
  arr name=components
strterms/str
  /arr
/requestHandler
 



SolrCloud - TermsComponent, Suggester etc.

2012-11-10 Thread AlexeyK
Hi,
I need a small clarification on how forwarding to the non-(/select) handler
works.
When I define a distinct handler /terms with TermsComponent inside (or
/suggest with the SpellCheckComponent defined for suggester), the
distributed call never works. The reason is simple - the request always gets
forwarded to the /select handler of other shards by HttpShardHandler.
The workaround is to set the QT parameter *and* SHARDS_QT.  

My question is: why not simply set the same handler path(/terms) for
outgoing shard requests without the additional parameters? Shouldn't it be
the default in cluster environment?

Thanks
Alexey




--
View this message in context: 
http://lucene.472066.n3.nabble.com/SolrCloud-TermsComponent-Suggester-etc-tp4019520.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solr TermsComponent: space in term

2012-08-02 Thread aniljayanti
Hi 

Im working on autocompelte functionality in solr. can u suggest me the
required configurations in schema.xml and solrconfig.xml for doing
autocomplete in solr ??

thanks in advance,

Anil




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-TermsComponent-space-in-term-tp1898889p3998755.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: TermsComponent show only terms that matched query?

2012-02-27 Thread Jay Hill
Yes, per-doc. I mentioned TermsComponent but meant TermVectorComponent,
where we get back all the terms in the doc. Just wondering if there was a
way to only get back the terms that matched the query.

Thanks EE,
-Jay


On Sat, Feb 25, 2012 at 2:54 PM, Erick Erickson erickerick...@gmail.comwrote:

 Jay:

 I've seen the this question go 'round before, but don't remember
 a satisfactory solution. Are you talking on a per-document basis
 here? If so, I vaguely remember it being possible to do something
 with highlighting, just counting the tags returned after highlighting.

 Best
 Erick

 On Fri, Feb 24, 2012 at 3:31 PM, Jay Hill jayallenh...@gmail.com wrote:
  I have a situation where I want to show the term counts as is done in the
  TermsComponent, but *only* for terms that are *matched* in a query, so I
  get something returned like this (pseudo code):
 
  q=title:(golf swing)
 
  doc
  title: golf legends show how to improve your golf swing on the golf
 course
  ...other fields
  /doc
 
  terms
  golf (3)
  swing (1)
  /terms
 
  rather than getting back all of the terms in the doc.
 
  Thanks,
  -Jay



Re: TermsComponent show only terms that matched query?

2012-02-25 Thread Erick Erickson
Jay:

I've seen the this question go 'round before, but don't remember
a satisfactory solution. Are you talking on a per-document basis
here? If so, I vaguely remember it being possible to do something
with highlighting, just counting the tags returned after highlighting.

Best
Erick

On Fri, Feb 24, 2012 at 3:31 PM, Jay Hill jayallenh...@gmail.com wrote:
 I have a situation where I want to show the term counts as is done in the
 TermsComponent, but *only* for terms that are *matched* in a query, so I
 get something returned like this (pseudo code):

 q=title:(golf swing)

 doc
 title: golf legends show how to improve your golf swing on the golf course
 ...other fields
 /doc

 terms
 golf (3)
 swing (1)
 /terms

 rather than getting back all of the terms in the doc.

 Thanks,
 -Jay


Re: TermsComponent show only terms that matched query?

2012-02-25 Thread Lance Norskog
I think you have to walk the term positions and offsets, look in the
stored field, and find the terms that matched. Which is exactly what
highlighting does. And this will only find the actual terms in the
text, no synonyms. So if you search for Sempranillo and find
Sempranillo in some wines and Tempranillo in others, you have to know
yourself that they are synonyms.

On Sat, Feb 25, 2012 at 2:54 PM, Erick Erickson erickerick...@gmail.com wrote:
 Jay:

 I've seen the this question go 'round before, but don't remember
 a satisfactory solution. Are you talking on a per-document basis
 here? If so, I vaguely remember it being possible to do something
 with highlighting, just counting the tags returned after highlighting.

 Best
 Erick

 On Fri, Feb 24, 2012 at 3:31 PM, Jay Hill jayallenh...@gmail.com wrote:
 I have a situation where I want to show the term counts as is done in the
 TermsComponent, but *only* for terms that are *matched* in a query, so I
 get something returned like this (pseudo code):

 q=title:(golf swing)

 doc
 title: golf legends show how to improve your golf swing on the golf course
 ...other fields
 /doc

 terms
 golf (3)
 swing (1)
 /terms

 rather than getting back all of the terms in the doc.

 Thanks,
 -Jay



-- 
Lance Norskog
goks...@gmail.com


TermsComponent show only terms that matched query?

2012-02-24 Thread Jay Hill
I have a situation where I want to show the term counts as is done in the
TermsComponent, but *only* for terms that are *matched* in a query, so I
get something returned like this (pseudo code):

q=title:(golf swing)

doc
title: golf legends show how to improve your golf swing on the golf course
...other fields
/doc

terms
golf (3)
swing (1)
/terms

rather than getting back all of the terms in the doc.

Thanks,
-Jay


Re: TermsComponent from deleted document

2011-09-10 Thread Manish Bafna
Which is preferable? using TermsComponent or Facets for autosuggest?

On Fri, Sep 9, 2011 at 10:33 PM, Chris Hostetter
hossman_luc...@fucit.orgwrote:


 : http://wiki.apache.org/solr/TermsComponent states that TermsComponent
 will
 : return frequencies from deleted documents too.
 :
 : Is there anyway to omit the deleted documents to get the frequencies.

 not really -- until a deleted document is expunged from segment merging,
 they are still included in the term stats which is what the TermsComponent
 looks at.

 If having 100% accurate term counts is really important to you, then you
 can optimize after doing any updates on your index - but there is
 obviously a performance tradeoff there.



 -Hoss



Re: TermsComponent from deleted document

2011-09-10 Thread Martijn v Groningen
I'd use the suggester:
http://wiki.apache.org/solr/Suggester

The suggester can give a collation. The TermsComponent can't do that.
The suggester builds on top of the spellchecking infrastructure, so
should be easy to use if you're familiar with that.

Martijn

On 10 September 2011 08:37, Manish Bafna manish.bafna...@gmail.com wrote:

 Which is preferable? using TermsComponent or Facets for autosuggest?

 On Fri, Sep 9, 2011 at 10:33 PM, Chris Hostetter
 hossman_luc...@fucit.orgwrote:

 
  : http://wiki.apache.org/solr/TermsComponent states that TermsComponent
  will
  : return frequencies from deleted documents too.
  :
  : Is there anyway to omit the deleted documents to get the frequencies.
 
  not really -- until a deleted document is expunged from segment merging,
  they are still included in the term stats which is what the TermsComponent
  looks at.
 
  If having 100% accurate term counts is really important to you, then you
  can optimize after doing any updates on your index - but there is
  obviously a performance tradeoff there.
 
 
 
  -Hoss
 



--
Met vriendelijke groet,

Martijn van Groningen


TermsComponent from deleted document

2011-09-09 Thread Manish Bafna
Hi,
http://wiki.apache.org/solr/TermsComponent states that TermsComponent will
return frequencies from deleted documents too.

Is there anyway to omit the deleted documents to get the frequencies.

I know there is a facets which can be used. Is it recommended to use facets
for autosuggest feature?

Thanks,
Manish.


Re: TermsComponent from deleted document

2011-09-09 Thread Chris Hostetter

: http://wiki.apache.org/solr/TermsComponent states that TermsComponent will
: return frequencies from deleted documents too.
: 
: Is there anyway to omit the deleted documents to get the frequencies.

not really -- until a deleted document is expunged from segment merging, 
they are still included in the term stats which is what the TermsComponent 
looks at.

If having 100% accurate term counts is really important to you, then you 
can optimize after doing any updates on your index - but there is 
obviously a performance tradeoff there.



-Hoss


SolrCloud and TermsComponent

2011-09-07 Thread Jamie Johnson
I took a quick look at TermsComponent and noticed that it works with
distributed queries but it doesn't seem to work with distrib=true.
Am I missing something, have there been any updates to this to get
this to work with SolrCloud?


Re: SolrCloud and TermsComponent

2011-09-07 Thread Mark Miller

On Sep 7, 2011, at 2:48 PM, Jamie Johnson wrote:

 I took a quick look at TermsComponent and noticed that it works with
 distributed queries but it doesn't seem to work with distrib=true.
 Am I missing something, have there been any updates to this to get
 this to work with SolrCloud?


Are you using trunk? I seem to remember a bug from a long time ago on the 
SolrCloud branch with this...if that's it, should be fixed though.


- Mark Miller
lucidimagination.com
2011.lucene-eurocon.org | Oct 17-20 | Barcelona












Re: SolrCloud and TermsComponent

2011-09-07 Thread Jamie Johnson
I have a snapshot of trunk from some time ago, I'll check the latest
code thanks for the reply

On Wed, Sep 7, 2011 at 3:39 PM, Mark Miller markrmil...@gmail.com wrote:

 On Sep 7, 2011, at 2:48 PM, Jamie Johnson wrote:

 I took a quick look at TermsComponent and noticed that it works with
 distributed queries but it doesn't seem to work with distrib=true.
 Am I missing something, have there been any updates to this to get
 this to work with SolrCloud?


 Are you using trunk? I seem to remember a bug from a long time ago on the 
 SolrCloud branch with this...if that's it, should be fixed though.


 - Mark Miller
 lucidimagination.com
 2011.lucene-eurocon.org | Oct 17-20 | Barcelona













Re: Termscomponent sort question

2011-05-26 Thread antonio
Hi Dmitry Kan, thanks for your anwser.
This is an idea, but i think that will be not so performing. Because if the
terms are 1000, i must reorder 1000 terms by own length, and i think the
time will be high for make autocomplete.

Don't you think?

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Termscomponent-sort-question-tp2980683p2988872.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Termscomponent sort question

2011-05-26 Thread Dmitry Kan
Hi antonio,

can you explain a bit more, how exactly have you implemented the
autocomplete, is it with the terms component only? Does autocomplete operate
on letter or word level?
What does user type in for which the server returns both Rome and Near
Rome?

-- Dmitry

On Thu, May 26, 2011 at 5:11 PM, antonio antonio...@email.it wrote:

 Hi Dmitry Kan, thanks for your anwser.
 This is an idea, but i think that will be not so performing. Because if the
 terms are 1000, i must reorder 1000 terms by own length, and i think the
 time will be high for make autocomplete.

 Don't you think?

 --
 View this message in context:
 http://lucene.472066.n3.nabble.com/Termscomponent-sort-question-tp2980683p2988872.html
 Sent from the Solr - User mailing list archive at Nabble.com.




-- 
Regards,

Dmitry Kan


Re: Termscomponent sort question

2011-05-25 Thread antonio
No one has an idea?

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Termscomponent-sort-question-tp2980683p2983776.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Termscomponent sort question

2011-05-25 Thread antonio
Help me please...

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Termscomponent-sort-question-tp2980683p2986185.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Termscomponent sort question

2011-05-25 Thread Dmitry Kan
Hi antonio,

Can you sort yourself on client side?

Are you trying to sort the terms with the same count in reverse order of
their lengths?

On Tue, May 24, 2011 at 8:18 PM, antonio antonio...@email.it wrote:

 Hi, i use solr 3.1.
 I implemented my autocomplete with TermsComponent. I'm finding, if there
 is,
 a way to sort my finding terms by score.
 Example, i there are two terms: Rome and Near Rome, that have the same
 count (that is 1), i would that Rome will be before Near Rome.
 Because count is the same, if i use index as sort, Near Rome is
 lexically before Rome.

 Is there a way to use score like in dismax for termscomponents? Using
 dismax, for example, if i search Rome, the word Rome has max score than
 Near Rome. I would the same behavior with TermComponent.

 Is it possible?

 Thanks.

 --
 View this message in context:
 http://lucene.472066.n3.nabble.com/Termscomponent-sort-question-tp2980683p2980683.html
 Sent from the Solr - User mailing list archive at Nabble.com.




-- 
Regards,

Dmitry Kan


Termscomponent sort question

2011-05-24 Thread antonio
Hi, i use solr 3.1.
I implemented my autocomplete with TermsComponent. I'm finding, if there is,
a way to sort my finding terms by score.
Example, i there are two terms: Rome and Near Rome, that have the same
count (that is 1), i would that Rome will be before Near Rome.
Because count is the same, if i use index as sort, Near Rome is
lexically before Rome.

Is there a way to use score like in dismax for termscomponents? Using
dismax, for example, if i search Rome, the word Rome has max score than
Near Rome. I would the same behavior with TermComponent.

Is it possible?

Thanks.

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Termscomponent-sort-question-tp2980683p2980683.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: How to debug if termsComponent is used

2011-05-03 Thread cyang2010
I tried it.  It just does not work.   the debug component only works when
query component is there, and it is just showing debugging information for
query result, not term match result.

--
View this message in context: 
http://lucene.472066.n3.nabble.com/How-to-debug-if-termsComponent-is-used-tp2891735p2895647.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: How to debug if termsComponent is used

2011-05-03 Thread Erick Erickson
Saying it does not work doesn't give us much to go on. Can you describe
what you've tried? *How* it fails? Have you looked in the log for any clues?

You might review this page:
http://wiki.apache.org/solr/UsingMailingLists

Best
Erick

On Tue, May 3, 2011 at 3:35 PM, cyang2010 ysxsu...@hotmail.com wrote:
 I tried it.  It just does not work.   the debug component only works when
 query component is there, and it is just showing debugging information for
 query result, not term match result.

 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/How-to-debug-if-termsComponent-is-used-tp2891735p2895647.html
 Sent from the Solr - User mailing list archive at Nabble.com.



Re: How to debug if termsComponent is used

2011-05-03 Thread cyang2010
Sorry i didn't mean to give random reply.  It is just today my solr
configuration/schema is different now and can't get the error message.

Anyway, i rerun the test.

Basically by specifying such searchcomponent and requesthandler, you won't
get any error.

When you query this it is fine without any debug message (of course, since
no debug parameter is defined in query).

http://localhost:8080/solr/titles/terms?terms=trueterms.fl=autosuggestterms.prefix=andyterms.mincount=1;

As soon as i specify the only debug parameter i know, debugQuery the solr
server give this error:
http://localhost:8080/solr/titles/terms?terms=trueterms.fl=autosuggestterms.prefix=andyterms.mincount=1debugQuery=true


May 3, 2011 1:27:37 PM org.apache.solr.core.SolrCore execute
INFO: [titles] webapp=/solr path=/terms
params={debugQuery=trueterms.mincount=1
terms.fl=autosuggestterms=trueterms.prefix=andy} status=500 QTime=641
May 3, 2011 1:27:37 PM org.apache.solr.common.SolrException log
SEVERE: java.lang.NullPointerException
at
org.apache.solr.handler.component.DebugComponent.process(DebugCompone
nt.java:54)
at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(Sea
rchHandler.java:203)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandl
erBase.java:131)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316)
at
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter
.java:338)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilte
r.java:241)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
568)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:286)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:845)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:583)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
7)
at java.lang.Thread.run(Thread.java:619)



That is all i get.  Let me know if i use the wrong parameter or what.

Thanks.


cy

--
View this message in context: 
http://lucene.472066.n3.nabble.com/How-to-debug-if-termsComponent-is-used-tp2891735p2895897.html
Sent from the Solr - User mailing list archive at Nabble.com.


How to debug if termsComponent is used

2011-05-02 Thread cyang2010
Hi, I defined a searchHanlder just for the sake of autosuggest, using
TermsComponent.

  searchComponent name=terms
class=org.apache.solr.handler.component.TermsComponent 
  /searchComponent


  requestHandler name=/terms
class=org.apache.solr.handler.component.SearchHandler
lst name=defaults
  str name=echoParamsexplicit/str
/lst

arr name=components
  strterms/str
  strdebug/str
/arr
  

This configuration might not even make sense, to configure terms and
debug component together.  Is debug component must be wired up with
query component?   I just need a requestHanlder where i can run
termsComponent, and debug on it.  How do I achieve that?

Thanks,

cy
  /requestHandler

--
View this message in context: 
http://lucene.472066.n3.nabble.com/How-to-debug-if-termsComponent-is-used-tp2891735p2891735.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: How to debug if termsComponent is used

2011-05-02 Thread Otis Gospodnetic
Hi,

That looks about right, but I don't know without checking around if debug 
component really needs query component, or if it can work with just terms 
component.
Have you tried it?  Did it not work?

You may save yourself a lot of work and get something better than terms 
component with http://sematext.com/products/autocomplete/index.html btw.  Or if 
you are using Solr trunk, with Suggester.

Otis

Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
Lucene ecosystem search :: http://search-lucene.com/



- Original Message 
 From: cyang2010 ysxsu...@hotmail.com
 To: solr-user@lucene.apache.org
 Sent: Mon, May 2, 2011 6:57:49 PM
 Subject: How to debug if termsComponent is used
 
 Hi, I defined a searchHanlder just for the sake of autosuggest,  using
 TermsComponent.
 
   searchComponent  name=terms
 class=org.apache.solr.handler.component.TermsComponent  
   /searchComponent
 
 
   requestHandler  name=/terms
 class=org.apache.solr.handler.component.SearchHandler
  lst name=defaults
   str  name=echoParamsexplicit/str
  /lst
 
 arr name=components
strterms/str
strdebug/str
 /arr
   
 
 This configuration might not even make sense, to configure terms  and
 debug component together.  Is debug component must be wired up  with
 query component?   I just need a requestHanlder where i can  run
 termsComponent, and debug on it.  How do I achieve  that?
 
 Thanks,
 
 cy
/requestHandler
 
 --
 View this message in context: 
http://lucene.472066.n3.nabble.com/How-to-debug-if-termsComponent-is-used-tp2891735p2891735.html

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


TermsComponent and Morelikethis

2011-03-31 Thread Isha Garg

Hi!
  plz tell me how  can we filter the termcomponent handler result  
on the basis of user query .Also explain me how interesting terms are 
shown in morelikethis for ml on the basis of user query.



Thanks!
Isha


Re: Solr TermsComponent: space in term

2011-03-03 Thread shrinath.m
why was this thread left unanswered ? Is there no way to achieve what the Op
had to say ?

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-TermsComponent-space-in-term-tp1898889p2624203.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solr TermsComponent: space in term

2011-03-03 Thread Ahmet Arslan
 Is there no way to achieve what the Op
 had to say ?
 

TermsComponent operates on indexed terms. One way to achieve multi-word 
suggestions is to use ShingleFilterFactory at index time.


  


Re: Solr TermsComponent: space in term

2011-03-03 Thread shrinath.m

iorixxx wrote:
 
 TermsComponent operates on indexed terms. One way to achieve multi-word
 suggestions is to use ShingleFilterFactory at index time.
 

Thank you @iorixxx.
Could you point me where I can find a good docs on how to do this ?  

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-TermsComponent-space-in-term-tp1898889p2624429.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solr TermsComponent: space in term

2011-03-03 Thread Markus Jelsma
http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.ShingleFilterFactory

On Thursday 03 March 2011 12:15:07 shrinath.m wrote:
 iorixxx wrote:
  TermsComponent operates on indexed terms. One way to achieve multi-word
  suggestions is to use ShingleFilterFactory at index time.
 
 Thank you @iorixxx.
 Could you point me where I can find a good docs on how to do this ?
 
 --
 View this message in context:
 http://lucene.472066.n3.nabble.com/Solr-TermsComponent-space-in-term-tp189
 8889p2624429.html Sent from the Solr - User mailing list archive at
 Nabble.com.

-- 
Markus Jelsma - CTO - Openindex
http://www.linkedin.com/in/markus17
050-8536620 / 06-50258350


Re: Solr TermsComponent: space in term

2011-03-03 Thread shrinath.m

Markus Jelsma-2 wrote:
 
 http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.ShingleFilterFactory
 
well, thank you Markus, 

Now My schema has the following : 














if I run a query like this : 

http://localhost:8983/solr/select?rows=0q=cfacet=truefacet.field=textfacet.mincount=1facet.prefix=com

I get output saying : 


1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1



how do I restrict it to only those words present in the documents and not
something like compliance w ?


--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-TermsComponent-space-in-term-tp1898889p2624547.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solr TermsComponent: space in term

2011-03-03 Thread Ahmet Arslan


You need to remove EdgeNGramFilterFactory from your analyzer chain.



--- On Thu, 3/3/11, shrinath.m shrinat...@webyog.com wrote:

 From: shrinath.m shrinat...@webyog.com
 Subject: Re: Solr TermsComponent: space in term
 To: solr-user@lucene.apache.org
 Date: Thursday, March 3, 2011, 1:41 PM
 
 Markus Jelsma-2 wrote:
  
  http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.ShingleFilterFactory
  
 well, thank you Markus, 
 
 Now My schema has the following : 
 
 
             
                 
                 
                 
                 
         
                 
                 
                 
             
         
 
 if I run a query like this : 
 
 http://localhost:8983/solr/select?rows=0q=cfacet=truefacet.field=textfacet.mincount=1facet.prefix=com
 
 I get output saying : 
 
 
 1
 1
 1
 1
 1
 1
 1
 1
 1
 1
 1
 1
 1
 1
 1
 1
 1
 1
 1
 
 
 
 how do I restrict it to only those words present in the
 documents and not
 something like compliance w ?
 
 
 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/Solr-TermsComponent-space-in-term-tp1898889p2624547.html
 Sent from the Solr - User mailing list archive at
 Nabble.com.
 





Re: Getting sum of all terms count in dataset instead of document count using TermsComponent....(and TermsComponent vs Facets)

2011-02-28 Thread Ahmet Arslan
 from head, but also tried on
  1.4.1.
 
 
 The instructions i posted works with 1.4.1. You need to
 import TermDocs in TermsComponent.java :
 
 import org.apache.lucene.index.TermDocs;

Ravish, did you get it working? Can you give us feedback?


  


Getting sum of all terms count in dataset instead of document count using TermsComponent....(and TermsComponent vs Facets)

2011-02-27 Thread Ravish Bhagdev
Hi Guys,

I need a bit of help.

I want to produce frequency analysis of all tokens inside my solr Index from
a specific (content) field.

When I use TermsComponent or FacetCounts, what I get is how many records or
documents each term appears in (which again confuses me as to what the
difference is, is it facets are restricted to terms in result set and
termscomponent is not restricted by the query?).  Is there yet a way to get
total terms count (not per document but across the whole index)?  I have
tried searching in archieves and across web but closest match I found is
this: http://search-lucene.com/m/of5Fn1PUOHU/

It is suggested in this post that I can post the mentioned lines of code
into TermsComponent.java and it should work.  However, the code seems to
have changed since and when I try this, the Class TermDocs is not even
recognized.

I was wondering if there is any other way by using Lucene or Solr to do
this.  I will be very grateful for any reply.  If it helps, below is the
code I am running right now which gives me document count and not Terms
count.

String queryString = document:*;

SolrQuery solrQuery = new SolrQuery();
solrQuery.setQuery(queryString);
solrQuery.setQueryType(/terms);
solrQuery.setTerms(true);
solrQuery.setTermsLimit(20);
solrQuery.setParam(terms.fl, document);
solrQuery.setTermsSortString(count);

QueryResponse solrResp = conf._solr.executeQuery(solrQuery, 0, 10);

TermsResponse termsResp = solrResp.getTermsResponse();
ListTermsResponse.Term terms = termsResp.getTerms(document);

Ignore the conf object and _solr variable thats just my internal singleton
object.

Thanks,
Ravish Bhagdev


Re: Getting sum of all terms count in dataset instead of document count using TermsComponent....(and TermsComponent vs Facets)

2011-02-27 Thread Ahmet Arslan
 I want to produce frequency analysis of all tokens inside
 my solr Index from
 a specific (content) field.
 
 When I use TermsComponent or FacetCounts, what I get is how
 many records or
 documents each term appears in (which again confuses me as
 to what the
 difference is, is it facets are restricted to terms in
 result set and
 termscomponent is not restricted by the query?).  Is
 there yet a way to get
 total terms count (not per document but across the whole
 index)?  

Terms Component does not respect q= parameter. In other words, it is not 
restricted by the query.

 I have
 tried searching in archieves and across web but closest
 match I found is
 this: http://search-lucene.com/m/of5Fn1PUOHU/
 
 It is suggested in this post that I can post the mentioned
 lines of code
 into TermsComponent.java and it should work.  However,
 the code seems to
 have changed since and when I try this, the Class TermDocs
 is not even
 recognized.

What version of solr are you using?
 





Re: Getting sum of all terms count in dataset instead of document count using TermsComponent....(and TermsComponent vs Facets)

2011-02-27 Thread Ravish Bhagdev
Yes, you are right.  Ignore the query (document:*), it wont matter if i have
it for termscomponent i guess.

I've compiled current source from head, but also tried on 1.4.1.

Any idea how to go about finding a solution to this?

Thanks,
Ravish

On Sun, Feb 27, 2011 at 1:56 PM, Ahmet Arslan iori...@yahoo.com wrote:

  I want to produce frequency analysis of all tokens inside
  my solr Index from
  a specific (content) field.
 
  When I use TermsComponent or FacetCounts, what I get is how
  many records or
  documents each term appears in (which again confuses me as
  to what the
  difference is, is it facets are restricted to terms in
  result set and
  termscomponent is not restricted by the query?).  Is
  there yet a way to get
  total terms count (not per document but across the whole
  index)?

 Terms Component does not respect q= parameter. In other words, it is not
 restricted by the query.

  I have
  tried searching in archieves and across web but closest
  match I found is
  this: http://search-lucene.com/m/of5Fn1PUOHU/
 
  It is suggested in this post that I can post the mentioned
  lines of code
  into TermsComponent.java and it should work.  However,
  the code seems to
  have changed since and when I try this, the Class TermDocs
  is not even
  recognized.

 What version of solr are you using?







Re: Getting sum of all terms count in dataset instead of document count using TermsComponent....(and TermsComponent vs Facets)

2011-02-27 Thread Ahmet Arslan
 I've compiled current source from head, but also tried on
 1.4.1.


The instructions i posted works with 1.4.1. You need to import TermDocs in 
TermsComponent.java :

import org.apache.lucene.index.TermDocs;






  


Re: Terms and termscomponent questions

2011-02-03 Thread Erick Erickson
There are a couple of things going on here. First,
WordDelimiterFilterFactory is
splitting things up on letter/number boundaries. Take a look at:
http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters

for a list of *some* of the available tokenizers. You may want to just use
one of the others, or change the parameters to
WordDelimiterFilterFilterFactory
to not split as it is.

See the page: http://localhost:8983/solr/admin/analysis.jsp and check the
verbose
box to see what the effects of the various elements in your analysis chain
are.
This is a very important page for understanding the analysis part of the
whole
operation.

Second, if you've been trying different things out, you may well have some
old stuff in your index. When you delete documents, the terms are still in
the index until an optimize. I'd advise starting with a clean slate for your
experiments each time. The cheap way to do this is stop your server and
delete solr_home/data/index. Delete the index directory too, not just the
contents. So it's possible your TermsComponent is returning data from
previous
attempts, because I sure don't see how the concatenated terms would be
in this index given the definition you've posted.

And if none of that works, well, we'll try something else G..

Best
Erick

On Tue, Feb 1, 2011 at 10:07 AM, openvictor Open openvic...@gmail.comwrote:

 Dear Erick,

 Thank you for your answer, here is my fieldtype definition. I took the
 standard one because I don't need a better one for this field

 fieldType name=text class=solr.TextField positionIncrementGap=100
 analyzer type=index
 tokenizer class=solr.WhitespaceTokenizerFactory/
 filter class=solr.StopFilterFactory ignoreCase=true
 words=stopwords.txt enablePositionIncrements=true/
 filter class=solr.WordDelimiterFilterFactory generateWordParts=1
 generateNumberParts=1 catenateWords=1 catenateNumbers=1
 catenateAll=0 splitOnCaseChange=1/
 filter class=solr.LowerCaseFilterFactory/
 filter class=solr.SnowballPorterFilterFactory language=English
 protected=protwords.txt/
 /analyzer
 analyzer type=query
 tokenizer class=solr.WhitespaceTokenizerFactory/
 filter class=solr.SynonymFilterFactory synonyms=synonyms.txt
 ignoreCase=true expand=true/
 filter class=solr.StopFilterFactory ignoreCase=true
 words=stopwords.txt enablePositionIncrements=true/
 filter class=solr.WordDelimiterFilterFactory generateWordParts=1
 generateNumberParts=1 catenateWords=0 catenateNumbers=0
 catenateAll=0 splitOnCaseChange=1/
 filter class=solr.LowerCaseFilterFactory/
 filter class=solr.SnowballPorterFilterFactory language=English
 protected=protwords.txt/
 /analyzer
 /fieldType

 Now my field :

 field name=p_field type=text indexed=true stored=true/

 But I have a doubt now... Do I really put a space between words or is it
 just a coma... If I only put a coma then the whole process is going to be
 impacted ? What I don't really understand is that I find the separate
 words,
 but also their concatenation (but again in one direction only). Let me
 explain : if a have man bear pig I will find :
 manbearpig bearpig but never pigman or anyother combination in a
 different order.

 Thank you very much
 Best Regards,
 Victor

 2011/2/1 Erick Erickson erickerick...@gmail.com

  Nope, this isn't what I'd expect. There are a couple of possibilities:
  1 check out what WordDelimiterFilterFactory is doing, although
  if you're really sending spaces that's probably not it.
  2 Let's see the field and fieldType definitions for the field
  in question. type=text doesn't say anything about analysis,
  and that's where I'd expect you're having trouble. In particular
  if your analysis chain uses KeywordTokenizerFactory for instance.
  3 Look at the admin/schema browse page, look at your field and
  see what the actual tokens are. That'll tell you what TermsComponents
  is returning, perhaps the concatenation is happening somewhere
  else.
 
  Bottom line: Solr will not concatenate terms like this unless you tell it
  to,
  so I suspect you're telling it to, you just don't realize it G...
 
  Best
  Erick
 
  On Tue, Feb 1, 2011 at 1:33 AM, openvictor Open openvic...@gmail.com
  wrote:
 
   Dear Solr users,
  
   I am currently using SolR and TermsComponents to make an auto suggest
 for
   my
   website.
  
   I have a field called p_field indexed and stored with type=text in
 the
   schema xml. Nothing out of the usual.
   I feed to Solr a set of words separated by a coma and a space such as
  (for
   two documents) :
  
   Document 1:
   word11, word12, word13. word14
  
   Document 2:
   word21, word22, word23. word24
  
  
   When I use my newly designed field I get things for the prefix word1
 :
   word11, word12, word13. word14 word11word12 word11word13 etc...
   Is it normal to have the concatenation of words and not only the words
   indexed ? Did I miss something about Terms ?
  
   Thank you very much,
   Best regards all,
   Victor
  
 



Re: Terms and termscomponent questions

2011-02-03 Thread openvictor Open
Dear Erick,

You were totally right about the fact that I didn't use any space to
separate words, cause SolR to concatenate words !
Everything is solved now. Thank you very much for your help !

Best regards,
Victor Kabdebon

2011/2/3 Erick Erickson erickerick...@gmail.com

 There are a couple of things going on here. First,
 WordDelimiterFilterFactory is
 splitting things up on letter/number boundaries. Take a look at:
 http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters

 for a list of *some* of the available tokenizers. You may want to just use
 one of the others, or change the parameters to
 WordDelimiterFilterFilterFactory
 to not split as it is.

 See the page: http://localhost:8983/solr/admin/analysis.jsp and check the
 verbose
 box to see what the effects of the various elements in your analysis chain
 are.
 This is a very important page for understanding the analysis part of the
 whole
 operation.

 Second, if you've been trying different things out, you may well have some
 old stuff in your index. When you delete documents, the terms are still in
 the index until an optimize. I'd advise starting with a clean slate for
 your
 experiments each time. The cheap way to do this is stop your server and
 delete solr_home/data/index. Delete the index directory too, not just the
 contents. So it's possible your TermsComponent is returning data from
 previous
 attempts, because I sure don't see how the concatenated terms would be
 in this index given the definition you've posted.

 And if none of that works, well, we'll try something else G..

 Best
 Erick

 On Tue, Feb 1, 2011 at 10:07 AM, openvictor Open openvic...@gmail.com
 wrote:

  Dear Erick,
 
  Thank you for your answer, here is my fieldtype definition. I took the
  standard one because I don't need a better one for this field
 
  fieldType name=text class=solr.TextField positionIncrementGap=100
  analyzer type=index
  tokenizer class=solr.WhitespaceTokenizerFactory/
  filter class=solr.StopFilterFactory ignoreCase=true
  words=stopwords.txt enablePositionIncrements=true/
  filter class=solr.WordDelimiterFilterFactory generateWordParts=1
  generateNumberParts=1 catenateWords=1 catenateNumbers=1
  catenateAll=0 splitOnCaseChange=1/
  filter class=solr.LowerCaseFilterFactory/
  filter class=solr.SnowballPorterFilterFactory language=English
  protected=protwords.txt/
  /analyzer
  analyzer type=query
  tokenizer class=solr.WhitespaceTokenizerFactory/
  filter class=solr.SynonymFilterFactory synonyms=synonyms.txt
  ignoreCase=true expand=true/
  filter class=solr.StopFilterFactory ignoreCase=true
  words=stopwords.txt enablePositionIncrements=true/
  filter class=solr.WordDelimiterFilterFactory generateWordParts=1
  generateNumberParts=1 catenateWords=0 catenateNumbers=0
  catenateAll=0 splitOnCaseChange=1/
  filter class=solr.LowerCaseFilterFactory/
  filter class=solr.SnowballPorterFilterFactory language=English
  protected=protwords.txt/
  /analyzer
  /fieldType
 
  Now my field :
 
  field name=p_field type=text indexed=true stored=true/
 
  But I have a doubt now... Do I really put a space between words or is it
  just a coma... If I only put a coma then the whole process is going to be
  impacted ? What I don't really understand is that I find the separate
  words,
  but also their concatenation (but again in one direction only). Let me
  explain : if a have man bear pig I will find :
  manbearpig bearpig but never pigman or anyother combination in a
  different order.
 
  Thank you very much
  Best Regards,
  Victor
 
  2011/2/1 Erick Erickson erickerick...@gmail.com
 
   Nope, this isn't what I'd expect. There are a couple of possibilities:
   1 check out what WordDelimiterFilterFactory is doing, although
   if you're really sending spaces that's probably not it.
   2 Let's see the field and fieldType definitions for the field
   in question. type=text doesn't say anything about analysis,
   and that's where I'd expect you're having trouble. In particular
   if your analysis chain uses KeywordTokenizerFactory for instance.
   3 Look at the admin/schema browse page, look at your field and
   see what the actual tokens are. That'll tell you what
 TermsComponents
   is returning, perhaps the concatenation is happening somewhere
   else.
  
   Bottom line: Solr will not concatenate terms like this unless you tell
 it
   to,
   so I suspect you're telling it to, you just don't realize it G...
  
   Best
   Erick
  
   On Tue, Feb 1, 2011 at 1:33 AM, openvictor Open openvic...@gmail.com
   wrote:
  
Dear Solr users,
   
I am currently using SolR and TermsComponents to make an auto suggest
  for
my
website.
   
I have a field called p_field indexed and stored with type=text in
  the
schema xml. Nothing out of the usual.
I feed to Solr a set of words separated by a coma and a space such as
   (for
two documents) :
   
Document 1:
word11, word12, word13. word14
   
Document

Re: Terms and termscomponent questions

2011-02-03 Thread Erick Erickson
Ah, good. Good luck with the rest of your app! WordDelimiterFilterFactory
is powerful, but tricky G...

Best
Erick

On Thu, Feb 3, 2011 at 9:51 AM, openvictor Open openvic...@gmail.comwrote:

 Dear Erick,

 You were totally right about the fact that I didn't use any space to
 separate words, cause SolR to concatenate words !
 Everything is solved now. Thank you very much for your help !

 Best regards,
 Victor Kabdebon

 2011/2/3 Erick Erickson erickerick...@gmail.com

  There are a couple of things going on here. First,
  WordDelimiterFilterFactory is
  splitting things up on letter/number boundaries. Take a look at:
  http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
 
  for a list of *some* of the available tokenizers. You may want to just
 use
  one of the others, or change the parameters to
  WordDelimiterFilterFilterFactory
  to not split as it is.
 
  See the page: http://localhost:8983/solr/admin/analysis.jsp and check
 the
  verbose
  box to see what the effects of the various elements in your analysis
 chain
  are.
  This is a very important page for understanding the analysis part of the
  whole
  operation.
 
  Second, if you've been trying different things out, you may well have
 some
  old stuff in your index. When you delete documents, the terms are still
 in
  the index until an optimize. I'd advise starting with a clean slate for
  your
  experiments each time. The cheap way to do this is stop your server and
  delete solr_home/data/index. Delete the index directory too, not just
 the
  contents. So it's possible your TermsComponent is returning data from
  previous
  attempts, because I sure don't see how the concatenated terms would be
  in this index given the definition you've posted.
 
  And if none of that works, well, we'll try something else G..
 
  Best
  Erick
 
  On Tue, Feb 1, 2011 at 10:07 AM, openvictor Open openvic...@gmail.com
  wrote:
 
   Dear Erick,
  
   Thank you for your answer, here is my fieldtype definition. I took the
   standard one because I don't need a better one for this field
  
   fieldType name=text class=solr.TextField
 positionIncrementGap=100
   analyzer type=index
   tokenizer class=solr.WhitespaceTokenizerFactory/
   filter class=solr.StopFilterFactory ignoreCase=true
   words=stopwords.txt enablePositionIncrements=true/
   filter class=solr.WordDelimiterFilterFactory generateWordParts=1
   generateNumberParts=1 catenateWords=1 catenateNumbers=1
   catenateAll=0 splitOnCaseChange=1/
   filter class=solr.LowerCaseFilterFactory/
   filter class=solr.SnowballPorterFilterFactory language=English
   protected=protwords.txt/
   /analyzer
   analyzer type=query
   tokenizer class=solr.WhitespaceTokenizerFactory/
   filter class=solr.SynonymFilterFactory synonyms=synonyms.txt
   ignoreCase=true expand=true/
   filter class=solr.StopFilterFactory ignoreCase=true
   words=stopwords.txt enablePositionIncrements=true/
   filter class=solr.WordDelimiterFilterFactory generateWordParts=1
   generateNumberParts=1 catenateWords=0 catenateNumbers=0
   catenateAll=0 splitOnCaseChange=1/
   filter class=solr.LowerCaseFilterFactory/
   filter class=solr.SnowballPorterFilterFactory language=English
   protected=protwords.txt/
   /analyzer
   /fieldType
  
   Now my field :
  
   field name=p_field type=text indexed=true stored=true/
  
   But I have a doubt now... Do I really put a space between words or is
 it
   just a coma... If I only put a coma then the whole process is going to
 be
   impacted ? What I don't really understand is that I find the separate
   words,
   but also their concatenation (but again in one direction only). Let me
   explain : if a have man bear pig I will find :
   manbearpig bearpig but never pigman or anyother combination in a
   different order.
  
   Thank you very much
   Best Regards,
   Victor
  
   2011/2/1 Erick Erickson erickerick...@gmail.com
  
Nope, this isn't what I'd expect. There are a couple of
 possibilities:
1 check out what WordDelimiterFilterFactory is doing, although
if you're really sending spaces that's probably not it.
2 Let's see the field and fieldType definitions for the field
in question. type=text doesn't say anything about analysis,
and that's where I'd expect you're having trouble. In particular
if your analysis chain uses KeywordTokenizerFactory for instance.
3 Look at the admin/schema browse page, look at your field and
see what the actual tokens are. That'll tell you what
  TermsComponents
is returning, perhaps the concatenation is happening somewhere
else.
   
Bottom line: Solr will not concatenate terms like this unless you
 tell
  it
to,
so I suspect you're telling it to, you just don't realize it G...
   
Best
Erick
   
On Tue, Feb 1, 2011 at 1:33 AM, openvictor Open 
 openvic...@gmail.com
wrote:
   
 Dear Solr users,

 I am currently using SolR and TermsComponents to make an auto

Re: Terms and termscomponent questions

2011-02-01 Thread Erick Erickson
Nope, this isn't what I'd expect. There are a couple of possibilities:
1 check out what WordDelimiterFilterFactory is doing, although
 if you're really sending spaces that's probably not it.
2 Let's see the field and fieldType definitions for the field
 in question. type=text doesn't say anything about analysis,
 and that's where I'd expect you're having trouble. In particular
 if your analysis chain uses KeywordTokenizerFactory for instance.
3 Look at the admin/schema browse page, look at your field and
 see what the actual tokens are. That'll tell you what TermsComponents
 is returning, perhaps the concatenation is happening somewhere
 else.

Bottom line: Solr will not concatenate terms like this unless you tell it
to,
so I suspect you're telling it to, you just don't realize it G...

Best
Erick

On Tue, Feb 1, 2011 at 1:33 AM, openvictor Open openvic...@gmail.comwrote:

 Dear Solr users,

 I am currently using SolR and TermsComponents to make an auto suggest for
 my
 website.

 I have a field called p_field indexed and stored with type=text in the
 schema xml. Nothing out of the usual.
 I feed to Solr a set of words separated by a coma and a space such as (for
 two documents) :

 Document 1:
 word11, word12, word13. word14

 Document 2:
 word21, word22, word23. word24


 When I use my newly designed field I get things for the prefix word1 :
 word11, word12, word13. word14 word11word12 word11word13 etc...
 Is it normal to have the concatenation of words and not only the words
 indexed ? Did I miss something about Terms ?

 Thank you very much,
 Best regards all,
 Victor



Re: Terms and termscomponent questions

2011-02-01 Thread openvictor Open
Dear Erick,

Thank you for your answer, here is my fieldtype definition. I took the
standard one because I don't need a better one for this field

fieldType name=text class=solr.TextField positionIncrementGap=100
analyzer type=index
tokenizer class=solr.WhitespaceTokenizerFactory/
filter class=solr.StopFilterFactory ignoreCase=true
words=stopwords.txt enablePositionIncrements=true/
filter class=solr.WordDelimiterFilterFactory generateWordParts=1
generateNumberParts=1 catenateWords=1 catenateNumbers=1
catenateAll=0 splitOnCaseChange=1/
filter class=solr.LowerCaseFilterFactory/
filter class=solr.SnowballPorterFilterFactory language=English
protected=protwords.txt/
/analyzer
analyzer type=query
tokenizer class=solr.WhitespaceTokenizerFactory/
filter class=solr.SynonymFilterFactory synonyms=synonyms.txt
ignoreCase=true expand=true/
filter class=solr.StopFilterFactory ignoreCase=true
words=stopwords.txt enablePositionIncrements=true/
filter class=solr.WordDelimiterFilterFactory generateWordParts=1
generateNumberParts=1 catenateWords=0 catenateNumbers=0
catenateAll=0 splitOnCaseChange=1/
filter class=solr.LowerCaseFilterFactory/
filter class=solr.SnowballPorterFilterFactory language=English
protected=protwords.txt/
/analyzer
/fieldType

Now my field :

field name=p_field type=text indexed=true stored=true/

But I have a doubt now... Do I really put a space between words or is it
just a coma... If I only put a coma then the whole process is going to be
impacted ? What I don't really understand is that I find the separate words,
but also their concatenation (but again in one direction only). Let me
explain : if a have man bear pig I will find :
manbearpig bearpig but never pigman or anyother combination in a
different order.

Thank you very much
Best Regards,
Victor

2011/2/1 Erick Erickson erickerick...@gmail.com

 Nope, this isn't what I'd expect. There are a couple of possibilities:
 1 check out what WordDelimiterFilterFactory is doing, although
 if you're really sending spaces that's probably not it.
 2 Let's see the field and fieldType definitions for the field
 in question. type=text doesn't say anything about analysis,
 and that's where I'd expect you're having trouble. In particular
 if your analysis chain uses KeywordTokenizerFactory for instance.
 3 Look at the admin/schema browse page, look at your field and
 see what the actual tokens are. That'll tell you what TermsComponents
 is returning, perhaps the concatenation is happening somewhere
 else.

 Bottom line: Solr will not concatenate terms like this unless you tell it
 to,
 so I suspect you're telling it to, you just don't realize it G...

 Best
 Erick

 On Tue, Feb 1, 2011 at 1:33 AM, openvictor Open openvic...@gmail.com
 wrote:

  Dear Solr users,
 
  I am currently using SolR and TermsComponents to make an auto suggest for
  my
  website.
 
  I have a field called p_field indexed and stored with type=text in the
  schema xml. Nothing out of the usual.
  I feed to Solr a set of words separated by a coma and a space such as
 (for
  two documents) :
 
  Document 1:
  word11, word12, word13. word14
 
  Document 2:
  word21, word22, word23. word24
 
 
  When I use my newly designed field I get things for the prefix word1 :
  word11, word12, word13. word14 word11word12 word11word13 etc...
  Is it normal to have the concatenation of words and not only the words
  indexed ? Did I miss something about Terms ?
 
  Thank you very much,
  Best regards all,
  Victor
 



Terms and termscomponent questions

2011-01-31 Thread openvictor Open
Dear Solr users,

I am currently using SolR and TermsComponents to make an auto suggest for my
website.

I have a field called p_field indexed and stored with type=text in the
schema xml. Nothing out of the usual.
I feed to Solr a set of words separated by a coma and a space such as (for
two documents) :

Document 1:
word11, word12, word13. word14

Document 2:
word21, word22, word23. word24


When I use my newly designed field I get things for the prefix word1 :
word11, word12, word13. word14 word11word12 word11word13 etc...
Is it normal to have the concatenation of words and not only the words
indexed ? Did I miss something about Terms ?

Thank you very much,
Best regards all,
Victor


TermsComponent prefix query with fileds analyzers

2010-12-02 Thread Nestor Oviedo
Hi everyone
Does anyone know how to apply some analyzers over a prefix query?
What I'm looking for is a way to build an autosuggest using the
termsComponent that could be able to remove the accents from the
query's prefix.
For example, I have the term analisis in the index and I want to
retrieve it with the prefix Análi (notice the accent in the third
letter).
I think the regexp function won't help here, so I was wondering if
specifying some analyzers (LowerCase and ASCIIFolding) in the
termComponents configuration, it would be applied over the prefix.

Thanks in advance.
Nestor


Re: TermsComponent prefix query with fileds analyzers

2010-12-02 Thread Jonathan Rochkind
I don't believe you can.  If you just need query-time transformation, 
can't you just do it in your client app? If you need index-time 
transformation... well, you can do that, but it's up to your schema.xml 
and will of course apply to the field as a whole, not just for 
termscomponent queries, because that's just how solr works.


I'd note for your example, you'll also have to lowercase that capital A 
if you want it to match a lowercased a in a termscomponent prefix query.


To my mind (others may disagree), robust flexible auto-complete like 
this is still a somewhat unsolved problem in Solr, the termscomponent 
approach has it's definite limitations.


On 12/2/2010 12:24 PM, Nestor Oviedo wrote:

Hi everyone
Does anyone know how to apply some analyzers over a prefix query?
What I'm looking for is a way to build an autosuggest using the
termsComponent that could be able to remove the accents from the
query's prefix.
For example, I have the term analisis in the index and I want to
retrieve it with the prefix Análi (notice the accent in the third
letter).
I think the regexp function won't help here, so I was wondering if
specifying some analyzers (LowerCase and ASCIIFolding) in the
termComponents configuration, it would be applied over the prefix.

Thanks in advance.
Nestor



Re: TermsComponent prefix query with fileds analyzers

2010-12-02 Thread Ahmet Arslan
 Does anyone know how to apply some analyzers over a prefix
 query?

Lucene has an special QueryParser for this.

http://lucene.apache.org/java/3_0_2/api/contrib-misc/org/apache/lucene/queryParser/analyzing/AnalyzingQueryParser.html

Someone provided a patch to use it in solr. It was an attachment to a thread at 
nabble. I couldn't find it now.

Similar discussion : http://search-lucene.com/m/oMtRJQPgGb1/


  


Solr TermsComponent: space in term

2010-11-14 Thread Parsa Ghaffari
Hi folks,

I'm using Solr 1.4.1 and I'm willing to use TermsComponent for AutoComplete.
The problem is, I can't get it to match strings with spaces in them. So to
say,

terms.fl=nameterms.lower=davidterms.prefix=davidterms.lower.incl=falseindent=truewt=json

matches all strings starting with david but if I change it to:

terms.fl=nameterms.lower=david%20terms.prefix=david%20terms.lower.incl=falseindent=truewt=json

it doesn't match all strings starting with david . Is it meant to be that
way? If so, are n-grams the way to go? And does anybody know if
TermsComponent is implementing Tries or DAWGs or Raddix trees and if it's
efficient?

Cheers,
Parsa


Re: Solr TermsComponent: space in term

2010-11-14 Thread Ahmet Arslan
 terms.fl=nameterms.lower=david%20terms.prefix=david%20terms.lower.incl=falseindent=truewt=json
 
 it doesn't match all strings starting with david . Is it
 meant to be that
 way? 

This is about fielyType of name field. What is it? If it does have 
ShingleFilterFactory in it, then this is expected.


  


Re: Solr TermsComponent: space in term

2010-11-14 Thread Ahmet Arslan
 I'm using Solr 1.4.1 and I'm willing to use TermsComponent
 for AutoComplete.
 The problem is, I can't get it to match strings with spaces
 in them. So to
 say,
 
 terms.fl=nameterms.lower=davidterms.prefix=davidterms.lower.incl=falseindent=truewt=json
 
 matches all strings starting with david but if I change
 it to:
 
 terms.fl=nameterms.lower=david%20terms.prefix=david%20terms.lower.incl=falseindent=truewt=json
 
 it doesn't match all strings starting with david . Is it
 meant to be that
 way? 

This is about fielyType of name? What is it? If it does have 
ShingleFilterFactory in it, then this is expected.


  


Re: Solr TermsComponent: space in term

2010-11-14 Thread Parsa Ghaffari
Hi Ahmet,

This is the fieldType for name:

fieldType name=textgen class=solr.TextField
positionIncrementGap=100
  analyzer type=index
tokenizer class=solr.WhitespaceTokenizerFactory/
filter class=solr.StopFilterFactory ignoreCase=true
words=stopwords.txt enablePositionIncrements=true /
filter class=solr.WordDelimiterFilterFactory
generateWordParts=1 generateNumberParts=1 catenateWords=1
catenateNumbers=1 catenateAll=0 splitOnCaseChange=0/
filter class=solr.LowerCaseFilterFactory/
  /analyzer
  analyzer type=query
tokenizer class=solr.WhitespaceTokenizerFactory/
filter class=solr.SynonymFilterFactory synonyms=synonyms.txt
ignoreCase=true expand=true/
filter class=solr.StopFilterFactory
ignoreCase=true
words=stopwords.txt
enablePositionIncrements=true
/
filter class=solr.WordDelimiterFilterFactory
generateWordParts=1 generateNumberParts=1 catenateWords=0
catenateNumbers=0 catenateAll=0 splitOnCaseChange=0/
filter class=solr.LowerCaseFilterFactory/
  /analyzer
/fieldType

and:

field name=name type=textgen indexed=true stored=true/

there's no ShingleFilterFactory. And also after changing parameters in the
schema, should one re-index the table?


On Sun, Nov 14, 2010 at 10:32 PM, Ahmet Arslan iori...@yahoo.com wrote:

  I'm using Solr 1.4.1 and I'm willing to use TermsComponent
  for AutoComplete.
  The problem is, I can't get it to match strings with spaces
  in them. So to
  say,
 
 
 terms.fl=nameterms.lower=davidterms.prefix=davidterms.lower.incl=falseindent=truewt=json
 
  matches all strings starting with david but if I change
  it to:
 
 
 terms.fl=nameterms.lower=david%20terms.prefix=david%20terms.lower.incl=falseindent=truewt=json
 
  it doesn't match all strings starting with david . Is it
  meant to be that
  way?

 This is about fielyType of name? What is it? If it does have
 ShingleFilterFactory in it, then this is expected.






-- 
Parsa B. Ghaffari


Re: Solr TermsComponent: space in term

2010-11-14 Thread Ahmet Arslan

--- On Sun, 11/14/10, Parsa Ghaffari parsa.ghaff...@gmail.com wrote:

 From: Parsa Ghaffari parsa.ghaff...@gmail.com
 Subject: Re: Solr TermsComponent: space in term
 To: solr-user@lucene.apache.org
 Date: Sunday, November 14, 2010, 5:06 PM
 Hi Ahmet,
 
 This is the fieldType for name:
 
     fieldType name=textgen
 class=solr.TextField
 positionIncrementGap=100
       analyzer type=index
         tokenizer
 class=solr.WhitespaceTokenizerFactory/
         filter
 class=solr.StopFilterFactory ignoreCase=true
 words=stopwords.txt enablePositionIncrements=true
 /
         filter
 class=solr.WordDelimiterFilterFactory
 generateWordParts=1 generateNumberParts=1
 catenateWords=1
 catenateNumbers=1 catenateAll=0
 splitOnCaseChange=0/
         filter
 class=solr.LowerCaseFilterFactory/
       /analyzer
       analyzer type=query
         tokenizer
 class=solr.WhitespaceTokenizerFactory/
         filter
 class=solr.SynonymFilterFactory synonyms=synonyms.txt
 ignoreCase=true expand=true/
         filter
 class=solr.StopFilterFactory
                
 ignoreCase=true
                
 words=stopwords.txt
                
 enablePositionIncrements=true
                
 /
         filter
 class=solr.WordDelimiterFilterFactory
 generateWordParts=1 generateNumberParts=1
 catenateWords=0
 catenateNumbers=0 catenateAll=0
 splitOnCaseChange=0/
         filter
 class=solr.LowerCaseFilterFactory/
       /analyzer
     /fieldType
 
 and:
 
 field name=name type=textgen indexed=true
 stored=true/
 
 there's no ShingleFilterFactory. And also after changing
 parameters in the
 schema, should one re-index the table?

Yes yes, re-index and restart servlet container is required. What kind of 
values does name field take? Does it contains punctuations? Can you give some 
examples of that field's values?





Re: Solr TermsComponent: space in term

2010-11-14 Thread Parsa Ghaffari
Alphanumeric + _ + % + .

So to say: John_Smith, John Smith, John_B._Smith and John 44 Smith
are all possible values.

On Sun, Nov 14, 2010 at 11:46 PM, Ahmet Arslan iori...@yahoo.com wrote:


 --- On Sun, 11/14/10, Parsa Ghaffari parsa.ghaff...@gmail.com wrote:

  From: Parsa Ghaffari parsa.ghaff...@gmail.com
  Subject: Re: Solr TermsComponent: space in term
  To: solr-user@lucene.apache.org
  Date: Sunday, November 14, 2010, 5:06 PM
  Hi Ahmet,
 
  This is the fieldType for name:
 
  fieldType name=textgen
  class=solr.TextField
  positionIncrementGap=100
analyzer type=index
  tokenizer
  class=solr.WhitespaceTokenizerFactory/
  filter
  class=solr.StopFilterFactory ignoreCase=true
  words=stopwords.txt enablePositionIncrements=true
  /
  filter
  class=solr.WordDelimiterFilterFactory
  generateWordParts=1 generateNumberParts=1
  catenateWords=1
  catenateNumbers=1 catenateAll=0
  splitOnCaseChange=0/
  filter
  class=solr.LowerCaseFilterFactory/
/analyzer
analyzer type=query
  tokenizer
  class=solr.WhitespaceTokenizerFactory/
  filter
  class=solr.SynonymFilterFactory synonyms=synonyms.txt
  ignoreCase=true expand=true/
  filter
  class=solr.StopFilterFactory
 
  ignoreCase=true
 
  words=stopwords.txt
 
  enablePositionIncrements=true
 
  /
  filter
  class=solr.WordDelimiterFilterFactory
  generateWordParts=1 generateNumberParts=1
  catenateWords=0
  catenateNumbers=0 catenateAll=0
  splitOnCaseChange=0/
  filter
  class=solr.LowerCaseFilterFactory/
/analyzer
  /fieldType
 
  and:
 
  field name=name type=textgen indexed=true
  stored=true/
 
  there's no ShingleFilterFactory. And also after changing
  parameters in the
  schema, should one re-index the table?

 Yes yes, re-index and restart servlet container is required. What kind of
 values does name field take? Does it contains punctuations? Can you give
 some examples of that field's values?






-- 
Parsa B. Ghaffari


Re: How to use TermsComponent when I need a filter

2010-09-08 Thread Chris Hostetter

: Subject: How to use TermsComponent when I need a filter
: In-Reply-To: 8ffbbf6788bd5842b5a7274ef0f6837e01c3d...@msex85.morningstar.com
: References: 8ffbbf6788bd5842b5a7274ef0f6837e01c3d...@msex85.morningstar.com

http://people.apache.org/~hossman/#threadhijack
Thread Hijacking on Mailing Lists

When starting a new discussion on a mailing list, please do not reply to 
an existing message, instead start a fresh email.  Even if you change the 
subject line of your email, other mail headers still track which thread 
you replied to and your question is hidden in that thread and gets less 
attention.   It makes following discussions in the mailing list archives 
particularly difficult.
See Also:  http://en.wikipedia.org/wiki/User:DonDiego/Thread_hijacking



-Hoss

--
http://lucenerevolution.org/  ...  October 7-8, Boston
http://bit.ly/stump-hoss  ...  Stump The Chump!



How to use TermsComponent when I need a filter

2010-09-08 Thread David Yang
Hi,

 

I have a solr index, which for simplicity is just a list of names, and a
list of associations. (either a multivalue field e.g. {A1, A2, A3, A6}
or a string concatenation list e.g. A1 A2 A3 A6)

 

I want to be able to provide autocomplete but with a specific
association. E.g. Names beginning with Bob in association A5. 

 

Is this possible? I would prefer not to have to have one index per
association, since the number of associations is pretty large

 

Cheers,

 

David 

 



How to use TermsComponent when I need a filter

2010-09-07 Thread David Yang
Hi,

 

I have a solr index, which for simplicity is just a list of names, and a
list of associations. (either a multivalue field e.g. {A1, A2, A3, A6}
or a string concatenation list e.g. A1 A2 A3 A6)

I want to be able to provide autocomplete but with a specific
association. E.g. Names beginning with Bob in association A5. 

Is this possible? I would prefer not to have to have one index per
association, since the number of associations is pretty large

 

Cheers,

David 



TermsComponent - AutoComplete - Multiple Term Suggestions Inclusive Search?

2010-06-23 Thread Saïd Radhouani
Hi,

I'm using the Terms Component to se up the autocomplete feature based on a 
String field. Here are the params I'm using:

terms=trueterms.fl=typeterms.lower=catterms.prefix=catterms.lower.incl=false

With the above params, I've been able to get suggestions for terms that start 
with the specified prefix. I'm wondering wether it's possible to:

- have inclusive search, i.e., by typing cat, we get category, 
subcategory, etc.?

- start suggestion from any word in the field. i.e., by typing cat, we get 
The best category...?

Thanks!

 -Saïd




Re: TermsComponent - AutoComplete - Multiple Term Suggestions Inclusive Search?

2010-06-23 Thread Chantal Ackermann
Hi Saïd,

I think your problem is the field's type: String. You have to use a
TextField and apply tokenizers that will find subcategory if you put
in cat. (Not sure which filter does that, though. I wouldn't think
that the PorterStemmer cuts off prefix syllables of that kind?)

If, however, you search on an analyzed version of the field it should
return hits as usual according to the analyzer chain, and you can thus
use the values of that field listed in the hits as suggestions.

Exmple:
input: potter
field type: solr.TextField (with porter stemmer)
finds: Harry Potter and Whatever
and also Potters and Plums


Cheers,
Chantal


On Wed, 2010-06-23 at 13:17 +0200, Saïd Radhouani wrote:
 Hi,
 
 I'm using the Terms Component to se up the autocomplete feature based on a 
 String field. Here are the params I'm using:
 
 terms=trueterms.fl=typeterms.lower=catterms.prefix=catterms.lower.incl=false
 
 With the above params, I've been able to get suggestions for terms that start 
 with the specified prefix. I'm wondering wether it's possible to:
 
 - have inclusive search, i.e., by typing cat, we get category, 
 subcategory, etc.?
 
 - start suggestion from any word in the field. i.e., by typing cat, we get 
 The best category...?
 
 Thanks!
 
  -Saïd
 
 





Re: TermsComponent - AutoComplete - Multiple Term Suggestions Inclusive Search?

2010-06-23 Thread Sophie M.

To build your autocompletion, you can use the NGramFilterFactory. If you type
cat It will match subcategory and the best category.

If you change your mind and you don't want anymore to match subcategory, you
can use the EdgeNGramFilterFactory.
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/TermsComponent-AutoComplete-Multiple-Term-Suggestions-Inclusive-Search-tp916530p916769.html
Sent from the Solr - User mailing list archive at Nabble.com.


TermsComponent Reverse !?

2010-06-16 Thread stockii

Hello again Nabble :D 

TermsComponent works fine so far, but how can i get the same result for the
typing: 
harry pot - harry potter AND 
potter harr - harry potter

i try ReversedWildcardFilterFactory, but i dont want the reversed Word. i
want the reversed sentence. ^^

thx

-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/TermsComponent-Reverse-tp899644p899644.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: use termscomponent like spellComponent ?!

2010-03-23 Thread Grant Ingersoll

On Mar 22, 2010, at 12:09 PM, stocki wrote:

 
 thx.
 
 it try to patch solr with 1316 but it not works =( 
 
 do i need to checkout from svn Nightly ? 
 http://svn.apache.org/repos/asf/lucene/solr/ 

Yes, you will need to work from trunk.

 
 when i create a patch and then create the WAR it has only 40 MB ...
 
 
 
 
 Grant Ingersoll-6 wrote:
 
 See https://issues.apache.org/jira/browse/SOLR-1316
 
 
 On Mar 21, 2010, at 2:34 PM, stocki wrote:
 
 
 hello.
 
 i play with solr but i didn`t find the perfect solution for me.
 
 my goal is a search like the amazonsearch from the iPhoneApp. ;)
 
 it is possible to use the TermsComponent like the SpellComponent ? So,
 that
 works termsComp with more than one single Term ?!  
 
 i got these 3 docs with the name in my index:
 - nikon one
 - nikon two
 - nikon three
 
 so when ich search for nik termsCom suggest me  nikon. thats
 correctly
 whar i want.
 but when i type nikon on i want that solr suggest me nikon one , 
 
 how is that realizable ??? pleeease help me somebody ;) 
 
 a merge of TC nad SC where best solution in think so.
 
 field name=name type=textgen indexed=true stored=true
 required=true / 
 this is my searchfield. did i use the correct type ? 
 
 
 -- 
 View this message in context:
 http://old.nabble.com/use-termscomponent-like-spellComponent--%21-tp27977008p27977008.html
 Sent from the Solr - User mailing list archive at Nabble.com.
 
 
 --
 Grant Ingersoll
 http://www.lucidimagination.com/
 
 Search the Lucene ecosystem using Solr/Lucene:
 http://www.lucidimagination.com/search
 
 
 
 
 -- 
 View this message in context: 
 http://old.nabble.com/use-termscomponent-like-spellComponent--%21-tp27977008p27988620.html
 Sent from the Solr - User mailing list archive at Nabble.com.
 

--
Grant Ingersoll
http://www.lucidimagination.com/

Search the Lucene ecosystem using Solr/Lucene: 
http://www.lucidimagination.com/search



Re: use termscomponent like spellComponent ?!

2010-03-23 Thread Chris Hostetter

: so when ich search for nik termsCom suggest me  nikon. thats correctly
: whar i want.
: but when i type nikon on i want that solr suggest me nikon one , 

try using copyField to index an untokenized version of your field, so that 
nikon one is a single term, then nikon on as a prefix will match that 
in the TermComponent.



-Hoss



Re: use termscomponent like spellComponent ?!

2010-03-22 Thread Grant Ingersoll
See https://issues.apache.org/jira/browse/SOLR-1316


On Mar 21, 2010, at 2:34 PM, stocki wrote:

 
 hello.
 
 i play with solr but i didn`t find the perfect solution for me.
 
 my goal is a search like the amazonsearch from the iPhoneApp. ;)
 
 it is possible to use the TermsComponent like the SpellComponent ? So, that
 works termsComp with more than one single Term ?!  
 
 i got these 3 docs with the name in my index:
 - nikon one
 - nikon two
 - nikon three
 
 so when ich search for nik termsCom suggest me  nikon. thats correctly
 whar i want.
 but when i type nikon on i want that solr suggest me nikon one , 
 
 how is that realizable ??? pleeease help me somebody ;) 
 
 a merge of TC nad SC where best solution in think so.
 
 field name=name type=textgen indexed=true stored=true
 required=true / 
 this is my searchfield. did i use the correct type ? 
 
 
 -- 
 View this message in context: 
 http://old.nabble.com/use-termscomponent-like-spellComponent--%21-tp27977008p27977008.html
 Sent from the Solr - User mailing list archive at Nabble.com.
 

--
Grant Ingersoll
http://www.lucidimagination.com/

Search the Lucene ecosystem using Solr/Lucene: 
http://www.lucidimagination.com/search



Re: use termscomponent like spellComponent ?!

2010-03-22 Thread stocki

thx.

it try to patch solr with 1316 but it not works =( 

do i need to checkout from svn Nightly ? 
http://svn.apache.org/repos/asf/lucene/solr/ 

when i create a patch and then create the WAR it has only 40 MB ...




Grant Ingersoll-6 wrote:
 
 See https://issues.apache.org/jira/browse/SOLR-1316
 
 
 On Mar 21, 2010, at 2:34 PM, stocki wrote:
 
 
 hello.
 
 i play with solr but i didn`t find the perfect solution for me.
 
 my goal is a search like the amazonsearch from the iPhoneApp. ;)
 
 it is possible to use the TermsComponent like the SpellComponent ? So,
 that
 works termsComp with more than one single Term ?!  
 
 i got these 3 docs with the name in my index:
 - nikon one
 - nikon two
 - nikon three
 
 so when ich search for nik termsCom suggest me  nikon. thats
 correctly
 whar i want.
 but when i type nikon on i want that solr suggest me nikon one , 
 
 how is that realizable ??? pleeease help me somebody ;) 
 
 a merge of TC nad SC where best solution in think so.
 
 field name=name type=textgen indexed=true stored=true
 required=true / 
 this is my searchfield. did i use the correct type ? 
 
 
 -- 
 View this message in context:
 http://old.nabble.com/use-termscomponent-like-spellComponent--%21-tp27977008p27977008.html
 Sent from the Solr - User mailing list archive at Nabble.com.
 
 
 --
 Grant Ingersoll
 http://www.lucidimagination.com/
 
 Search the Lucene ecosystem using Solr/Lucene:
 http://www.lucidimagination.com/search
 
 
 

-- 
View this message in context: 
http://old.nabble.com/use-termscomponent-like-spellComponent--%21-tp27977008p27988620.html
Sent from the Solr - User mailing list archive at Nabble.com.



use termscomponent like spellComponent ?!

2010-03-21 Thread stocki

hello.

i play with solr but i didn`t find the perfect solution for me.

my goal is a search like the amazonsearch from the iPhoneApp. ;)

it is possible to use the TermsComponent like the SpellComponent ? So, that
works termsComp with more than one single Term ?!  

i got these 3 docs with the name in my index:
 - nikon one
 - nikon two
 - nikon three

so when ich search for nik termsCom suggest me  nikon. thats correctly
whar i want.
but when i type nikon on i want that solr suggest me nikon one , 

how is that realizable ??? pleeease help me somebody ;) 

a merge of TC nad SC where best solution in think so.

field name=name type=textgen indexed=true stored=true
required=true / 
this is my searchfield. did i use the correct type ? 


-- 
View this message in context: 
http://old.nabble.com/use-termscomponent-like-spellComponent--%21-tp27977008p27977008.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: TermsComponent, multiple fields, total count

2010-01-21 Thread Lukas Kahwe Smith

On 20.01.2010, at 15:50, Lukas Kahwe Smith wrote:

 
 On 19.01.2010, at 22:52, Lukas Kahwe Smith wrote:
 
 I also want to match multiple fields at once.
 
 Can you give an example?
 
 
 I enter Kreuz but this could either be part of a persons name or of a 
 street name, which are separate fields in my index mainly because they 
 analyzed differently (person name using doublemetaphone and street name 
 using word splitting to extract relevant parts for better matching).
 
 
 This is still really the kicker for me. Having to use TC on multiple fields 
 myself and adding up the results seems needlessly tedious. Plus, though I am 
 not sure if solr could do any better job here, adding up could produce dupes 
 (like a company using the city name as part of their company name).


Sorry about my little monolog here. Please free to jump in if you have some 
insights :)

Obviously one crazy approach could be to do a termscomponents search on all the 
fields and in order to get proper numbers run a dismax search for each term.

Another approach that I find a bit more feasible at this point is combining all 
fields together as the field to use for termscomponents. obviously this means 
that i cannot apply all of the various field specific analyzers that way, but 
its just auto complete. if people know what they want they will often cutpaste 
or just blindly type things out anyways. This however means that the numbers 
can be lower for a given term (since for example the doublemetaphone analyzer 
would not be applied to the name nor the word splitter for the street names).

So if I search for Kreuz I would not see people whos names are Creuz or 
streetnames that are Oberkreuzstrasse. But I would see people whos name is 
Kreuz or who live at Kreuzstrasse. So I will probably just represent the 
values shown in the auto suggest with a plus sign next to them or maybe even 
round them down to ranges (1+, 10+, 50+, 100+, 1000+, 1+ ..)

regards,
Lukas Kahwe Smith
m...@pooteeweet.org





Re: TermsComponent, multiple fields, total count

2010-01-21 Thread Lance Norskog
You can use the spelling dictionary feature for auto-complete. This is
actually more useful than facet.prefix because normal people are not
perfect spellers. (It would be even more useful based on phonemes, but
I haven't figured out how to do that yet.)

On Tue, Jan 19, 2010 at 6:28 PM, Erik Hatcher erik.hatc...@gmail.com wrote:

 On Jan 19, 2010, at 3:55 PM, Otis Gospodnetic wrote:

 a search quality meter. As in indicate the total number of matches
 (doesnt
 need to be accurate, just a ballpark figure especially if there are a lot
 of
 matches)

 As in, you want each suggestion include the number of documents it would
 match if that suggestion would be run as the query?
 Wouldn't that require one to execute that query, so if you want to show 10
 suggestions, you'd hit Solr 10 times?

 Not if you use faceting with the facet.prefix capability :)  It gives back
 counts per term suggested.

        Erik





-- 
Lance Norskog
goks...@gmail.com


AW: TermsComponent, multiple fields, total count

2010-01-20 Thread Chantal Ackermann
I find the DismaxRequestHandler perfect for matching multiple fields, matching 
phrases in other/subset of fields, weighting the different matches. It's 
powerful and fast.
You can define several DismaxRequestHandlers if you want to offer different 
kinds of search areas to the user (e.g. search for street, search for name, 
search for a product etc. and if you'd be wanting to weigh matches differently 
depending on the kind of search).

Cheers,
Chantal


 I also want to match multiple fields at once.

 Can you give an example?


I enter Kreuz but this could either be part of a persons name or of a street 
name, which are separate fields in my index mainly because they analyzed 
differently (person name using doublemetaphone and street name using word 
splitting to extract relevant parts for better matching).


termsComponent and filter queries

2010-01-19 Thread Naomi Dushay
I have a field that has millions of values, and I need to get the  
next X values in alpha order.  The terms component works fabulously  
for this.


Here is a cooked up example of the terms

a
b
f
q
r
rr
rrr
y
z
zzz

So if I ask for the 3 terms after r, I get rr, rrr and y.

But now I'd like to apply a filter query on a different field.  After  
the filter, my terms might be:


b
q
r
y
z
zzz

So the 3 terms after r, given the filter, become  y z and zzz

Given that I have millions of terms, and they are not predictable for  
range queries ... how can I get


the next X values of my field
after one or more filters are applied?

- Naomi


Re: TermsComponent, multiple fields, total count

2010-01-19 Thread Otis Gospodnetic
Hi Lukas,

 
- Original Message 

 From: Lukas Kahwe Smith m...@pooteeweet.org

 I want to use TermsComponent for both auto complete suggestions but also 
 showing 

Is TermsComponent really that good for AutoComplete?
Have a look at http://www.sematext.com/demo/ac/index.html - doesn't use TC.

 a search quality meter. As in indicate the total number of matches (doesnt 
 need to be accurate, just a ballpark figure especially if there are a lot of 
 matches)

As in, you want each suggestion include the number of documents it would match 
if that suggestion would be run as the query?
Wouldn't that require one to execute that query, so if you want to show 10 
suggestions, you'd hit Solr 10 times?

 I also want to match multiple fields at once.

Can you give an example?

Otis
--
Sematext -- http://sematext.com/ -- Solr - Lucene - Nutch

 I guess I can just issue multiple requests in order to get multiple fields 
 searched. But the total number is a bit more tricky. I can of course simply 
 add 
 up the counts for the limited number of results. But this is maybe a bit too 
 inaccurate and also seems like Lucene/Solr should be able to give me this 
 number 
 more efficiently.
 
 regards,
 Lukas Kahwe Smith
 m...@pooteeweet.org



Re: TermsComponent, multiple fields, total count

2010-01-19 Thread Lukas Kahwe Smith

On 19.01.2010, at 21:55, Otis Gospodnetic wrote:

 Hi Lukas,
 
 
 - Original Message 
 
 From: Lukas Kahwe Smith m...@pooteeweet.org
 
 I want to use TermsComponent for both auto complete suggestions but also 
 showing 
 
 Is TermsComponent really that good for AutoComplete?
 Have a look at http://www.sematext.com/demo/ac/index.html - doesn't use TC.

will check it out.

 a search quality meter. As in indicate the total number of matches (doesnt 
 need to be accurate, just a ballpark figure especially if there are a lot of 
 matches)
 
 As in, you want each suggestion include the number of documents it would 
 match if that suggestion would be run as the query?
 Wouldn't that require one to execute that query, so if you want to show 10 
 suggestions, you'd hit Solr 10 times?

Hmm actually now that you ask, I guess what I want makes no sense.

If I type in ver and get various terms which start with ver obviously if I 
submit that search unless something is actually indexes as just ver there 
will obviously be no match at all.

Let me briefly explain where I am coming from.
We have a search field and above it is the number of total entities in the db.
Now as people are typing in search terms we want to give them an indication of 
how many results they can expect if they submit now.
But this UI concept was made by the UI team and obviously inspired by a more 
RDBMS like LIKE foo% search, which i guess could be implemented in solr as 
well, but  the question is if it makes sense.

so i guess if i do use TC then it makes more sense to display a list of all 
autocomplete terms and their respective totals. if at all i should update the 
number above as the person is moving their focus to one of the autocomplete 
options.

 I also want to match multiple fields at once.
 
 Can you give an example?


I enter Kreuz but this could either be part of a persons name or of a street 
name, which are separate fields in my index mainly because they analyzed 
differently (person name using doublemetaphone and street name using word 
splitting to extract relevant parts for better matching).

regards,
Lukas Kahwe Smith
m...@pooteeweet.org





Re: termsComponent and filter queries

2010-01-19 Thread Yonik Seeley
You may be able to use faceting for this.
Use facet.method=enum - it will be more efficient for this specific use.

The main problem is that you can't specify a start term for faceting
though (you can only use numeric offset / limit into the list).

To do more will require either adding some terms component features to
faceting, or faceting features to terms component.

-Yonik
http://www.lucidimagination.com

On Tue, Jan 19, 2010 at 3:14 PM, Naomi Dushay ndus...@stanford.edu wrote:
 I have a field that has millions of values, and I need to get the next X
 values in alpha order.  The terms component works fabulously for this.

 Here is a cooked up example of the terms

 a
 b
 f
 q
 r
 rr
 rrr
 y
 z
 zzz

 So if I ask for the 3 terms after r, I get rr, rrr and y.

 But now I'd like to apply a filter query on a different field.  After the
 filter, my terms might be:

 b
 q
 r
 y
 z
 zzz

 So the 3 terms after r, given the filter, become  y z and zzz

 Given that I have millions of terms, and they are not predictable for range
 queries ... how can I get

 the next X values of my field
 after one or more filters are applied?

 - Naomi



Re: TermsComponent, multiple fields, total count

2010-01-19 Thread Erik Hatcher


On Jan 19, 2010, at 3:55 PM, Otis Gospodnetic wrote:
a search quality meter. As in indicate the total number of  
matches (doesnt
need to be accurate, just a ballpark figure especially if there are  
a lot of

matches)


As in, you want each suggestion include the number of documents it  
would match if that suggestion would be run as the query?
Wouldn't that require one to execute that query, so if you want to  
show 10 suggestions, you'd hit Solr 10 times?


Not if you use faceting with the facet.prefix capability :)  It gives  
back counts per term suggested.


Erik



TermsComponent, multiple fields, total count

2010-01-18 Thread Lukas Kahwe Smith
Hi,

I want to use TermsComponent for both auto complete suggestions but also 
showing a search quality meter. As in indicate the total number of matches 
(doesnt need to be accurate, just a ballpark figure especially if there are a 
lot of matches). I also want to match multiple fields at once.

I guess I can just issue multiple requests in order to get multiple fields 
searched. But the total number is a bit more tricky. I can of course simply add 
up the counts for the limited number of results. But this is maybe a bit too 
inaccurate and also seems like Lucene/Solr should be able to give me this 
number more efficiently.

regards,
Lukas Kahwe Smith
m...@pooteeweet.org





Re: TermsComponent results don't change after documents removed from index

2009-11-03 Thread Koji Sekiguchi

Bill Au wrote:

Should the results of the TermsComponent change after documents have been
removed from the index?  I am thinking about using the prefix of
TermsComponent to implement auto-suggest.  But I noticed that the prefix
counts in TermsComponent don't change after documents have been deleted.
The deletes are done with the standard update handler using a
delete-by-query.  Since the TermsComponent is showing the number of
documents matching the terms, the number should be decreasing when documents
are deleted.

I can reproduce this using the sample in the tutorial and the TermsComponent
prefix query in the Wiki:
http://wiki.apache.org/solr/TermsComponent

The output of the TermsComponent prefix doesn't change even after I removed
all the documents:

java -Ddata=args -jar post.jar deletequeryid:*/query/delete

What am I doing wrong?

Bill

  
This is a feature of Lucene... docFreq is not changed until segments 
containing

deletions are merged. You can do optimize to correct docFreq.

Koji

--
http://www.rondhuit.com/en/



Re: TermsComponent results don't change after documents removed from index

2009-11-03 Thread Bill Au
Thanks for pointing that out.  The TermsComponent prefix query is running
much faster than the facet prefix query.  I guess there is yet another
reason to optimize the index.

Bill

On Tue, Nov 3, 2009 at 5:09 PM, Koji Sekiguchi k...@r.email.ne.jp wrote:

 Bill Au wrote:

 Should the results of the TermsComponent change after documents have been
 removed from the index?  I am thinking about using the prefix of
 TermsComponent to implement auto-suggest.  But I noticed that the prefix
 counts in TermsComponent don't change after documents have been deleted.
 The deletes are done with the standard update handler using a
 delete-by-query.  Since the TermsComponent is showing the number of
 documents matching the terms, the number should be decreasing when
 documents
 are deleted.

 I can reproduce this using the sample in the tutorial and the
 TermsComponent
 prefix query in the Wiki:
 http://wiki.apache.org/solr/TermsComponent

 The output of the TermsComponent prefix doesn't change even after I
 removed
 all the documents:

 java -Ddata=args -jar post.jar deletequeryid:*/query/delete

 What am I doing wrong?

 Bill



 This is a feature of Lucene... docFreq is not changed until segments
 containing
 deletions are merged. You can do optimize to correct docFreq.

 Koji

 --
 http://www.rondhuit.com/en/




Re: TermsComponent or auto-suggest with filter

2009-10-07 Thread Jay Hill
Something like this, building on each character typed:

facet=onfacet.field=tc_queryfacet.prefix=befacet.mincount=1

-Jay
http://www.lucidimagination.com


On Tue, Oct 6, 2009 at 5:43 PM, R. Tan tanrihae...@gmail.com wrote:

 Nice. In comparison, how do you do it with faceting?

  Two other approaches are to use either the TermsComponent (new in Solr
  1.4) or faceting.



 On Wed, Oct 7, 2009 at 1:51 AM, Jay Hill jayallenh...@gmail.com wrote:

  Have a look at a blog I posted on how to use EdgeNGrams to build an
  auto-suggest tool:
 
 
 http://www.lucidimagination.com/blog/2009/09/08/auto-suggest-from-popular-queries-using-edgengrams/
 
  You could easily add filter queries to this approach. Ffor example, the
  query used in the blog could add filter queries like this:
 
  http://localhost:8983/solr/select/?q=user_query:
  ”i”wt=jsonfl=user_queryindent=onechoParams=nonerows=10sort=count
  descfq=yourField:yourQueryfq=anotherField:anotherQuery
 
  -Jay
  http://www.lucidimagination.com
 
 
 
 
  On Tue, Oct 6, 2009 at 4:40 AM, R. Tan tanrihae...@gmail.com wrote:
 
   Hello,
   What's the best way to get auto-suggested terms/keywords that is
 filtered
   by
   one or more fields? TermsComponent should have been the solution but
   filters
   are not supported.
  
   Thanks,
   Rihaed
  
 



Re: TermsComponent or auto-suggest with filter

2009-10-07 Thread R. Tan
Thanks Jay. What's a good way of extracting the original text from here?

On Thu, Oct 8, 2009 at 1:03 AM, Jay Hill jayallenh...@gmail.com wrote:

 Something like this, building on each character typed:

 facet=onfacet.field=tc_queryfacet.prefix=befacet.mincount=1

 -Jay
 http://www.lucidimagination.com


 On Tue, Oct 6, 2009 at 5:43 PM, R. Tan tanrihae...@gmail.com wrote:

  Nice. In comparison, how do you do it with faceting?
 
   Two other approaches are to use either the TermsComponent (new in Solr
   1.4) or faceting.
 
 
 
  On Wed, Oct 7, 2009 at 1:51 AM, Jay Hill jayallenh...@gmail.com wrote:
 
   Have a look at a blog I posted on how to use EdgeNGrams to build an
   auto-suggest tool:
  
  
 
 http://www.lucidimagination.com/blog/2009/09/08/auto-suggest-from-popular-queries-using-edgengrams/
  
   You could easily add filter queries to this approach. Ffor example, the
   query used in the blog could add filter queries like this:
  
   http://localhost:8983/solr/select/?q=user_query:
   ”i”wt=jsonfl=user_queryindent=onechoParams=nonerows=10sort=count
   descfq=yourField:yourQueryfq=anotherField:anotherQuery
  
   -Jay
   http://www.lucidimagination.com
  
  
  
  
   On Tue, Oct 6, 2009 at 4:40 AM, R. Tan tanrihae...@gmail.com wrote:
  
Hello,
What's the best way to get auto-suggested terms/keywords that is
  filtered
by
one or more fields? TermsComponent should have been the solution but
filters
are not supported.
   
Thanks,
Rihaed
   
  
 



TermsComponent or auto-suggest with filter

2009-10-06 Thread R. Tan
Hello,
What's the best way to get auto-suggested terms/keywords that is filtered by
one or more fields? TermsComponent should have been the solution but filters
are not supported.

Thanks,
Rihaed


Re: TermsComponent or auto-suggest with filter

2009-10-06 Thread Jay Hill
Have a look at a blog I posted on how to use EdgeNGrams to build an
auto-suggest tool:
http://www.lucidimagination.com/blog/2009/09/08/auto-suggest-from-popular-queries-using-edgengrams/

You could easily add filter queries to this approach. Ffor example, the
query used in the blog could add filter queries like this:

http://localhost:8983/solr/select/?q=user_query:”i”wt=jsonfl=user_queryindent=onechoParams=nonerows=10sort=count
descfq=yourField:yourQueryfq=anotherField:anotherQuery

-Jay
http://www.lucidimagination.com




On Tue, Oct 6, 2009 at 4:40 AM, R. Tan tanrihae...@gmail.com wrote:

 Hello,
 What's the best way to get auto-suggested terms/keywords that is filtered
 by
 one or more fields? TermsComponent should have been the solution but
 filters
 are not supported.

 Thanks,
 Rihaed



Re: TermsComponent or auto-suggest with filter

2009-10-06 Thread R. Tan
Nice. In comparison, how do you do it with faceting?

 Two other approaches are to use either the TermsComponent (new in Solr
 1.4) or faceting.



On Wed, Oct 7, 2009 at 1:51 AM, Jay Hill jayallenh...@gmail.com wrote:

 Have a look at a blog I posted on how to use EdgeNGrams to build an
 auto-suggest tool:

 http://www.lucidimagination.com/blog/2009/09/08/auto-suggest-from-popular-queries-using-edgengrams/

 You could easily add filter queries to this approach. Ffor example, the
 query used in the blog could add filter queries like this:

 http://localhost:8983/solr/select/?q=user_query:
 ”i”wt=jsonfl=user_queryindent=onechoParams=nonerows=10sort=count
 descfq=yourField:yourQueryfq=anotherField:anotherQuery

 -Jay
 http://www.lucidimagination.com




 On Tue, Oct 6, 2009 at 4:40 AM, R. Tan tanrihae...@gmail.com wrote:

  Hello,
  What's the best way to get auto-suggested terms/keywords that is filtered
  by
  one or more fields? TermsComponent should have been the solution but
  filters
  are not supported.
 
  Thanks,
  Rihaed
 



Re: TermsComponent

2009-09-10 Thread Jay Hill
If you need an alternative to using the TermsComponent for auto-suggest,
have a look at this blog on using EdgeNGrams instead of the TermsComponent.

http://www.lucidimagination.com/blog/2009/09/08/auto-suggest-from-popular-queries-using-edgengrams/

-Jay
http://www.lucidimagination.com


On Wed, Sep 9, 2009 at 3:35 PM, Todd Benge todd.be...@gmail.com wrote:

 We're using the StandardAnalyzer but I'm fairly certain that's not the
 issue.

 In fact, I there doesn't appear to be any issue with Lucene or Solr.  There
 are many instances of data in which users have removed the whitespace so
 they have a high frequency which means they bubble to the top of the sort.
 The result is that a search for a name shows a first and last name without
 the whitespace.

 One thing I've noticed is that since TermsComponent is working on a single
 Term, there doesn't seem to be a way to query against a phrase.  The same
 example as above applies, so if you're querying for name it'd be prefered
 to
 get multi-term responses back if a first name matches.

 Any suggestions?

 Thanks for all the help.  It's much appreciated.

 Todd


 On Wed, Sep 9, 2009 at 12:11 PM, Grant Ingersoll gsing...@apache.org
 wrote:

  And what Analyzer are you using?  I'm guessing that your words are being
  split up during analysis, which is why you aren't seeing whitespace.  If
 you
  want to keep the whitespace, you will need to use the String field type
 or
  possibly the Keyword Analyzer.
 
  -Grant
 
 
  On Sep 9, 2009, at 11:06 AM, Todd Benge wrote:
 
   It's set as Field.Store.YES, Field.Index.ANALYZED.
 
 
 
  On Wed, Sep 9, 2009 at 8:15 AM, Grant Ingersoll gsing...@apache.org
  wrote:
 
   How are you tokenizing/analyzing the field you are accessing?
 
 
  On Sep 9, 2009, at 8:49 AM, Todd Benge wrote:
 
  Hi Rekha,
 
 
  Here's teh link to the TermsComponent info:
 
  http://wiki.apache.org/solr/TermsComponent
 
  and another link Matt Weber did on autocompletion:
 
 
 
 
 http://www.mattweber.org/2009/05/02/solr-autosuggest-with-termscomponent-and-jquery/
 
  We had to upgrade to the latest nightly to get the TermsComponent to
  work.
 
  Good Luck!
 
  Todd
 
  On Wed, Sep 9, 2009 at 5:17 AM, dharhsana rekha.dharsh...@gmail.com
  wrote:
 
 
   Hi,
 
  I have a requirement on Autocompletion search , iam using solr 1.4.
 
  Could you please tell me how you worked on that Terms component using
  solr
  1.4,
  i could'nt find terms component in solr 1.4 which i have
 downloaded,is
  there
  anyother configuration should be done.
 
  Do you have code for autocompletion, please share wih me..
 
  Regards
  Rekha
 
 
 
  tbenge wrote:
 
 
  Hi,
 
  I was looking at TermsComponent in Solr 1.4 as a way of building a
  autocomplete function.  I have a prototype working but noticed that
  terms
  that have whitespace in them when indexed are absent the whitespace
  when
  returned from the TermsComponent.
 
  Any ideas on why that may be happening?  Am I just missing a
 
   configuration
 
   option?
 
  Thanks,
 
  Todd
 
 
 
   --
  View this message in context:
  http://www.nabble.com/TermsComponent-tp25302503p25362829.html
  Sent from the Solr - User mailing list archive at Nabble.com.
 
 
 
   --
  Grant Ingersoll
  http://www.lucidimagination.com/
 
  Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids)
 using
  Solr/Lucene:
  http://www.lucidimagination.com/search
 
 
 
  --
  Grant Ingersoll
  http://www.lucidimagination.com/
 
  Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids) using
  Solr/Lucene:
  http://www.lucidimagination.com/search
 
 



Re: TermsComponent

2009-09-10 Thread Todd Benge
Thanks for the pointer.  Definitely appreciate the help.

Todd

On Thu, Sep 10, 2009 at 11:10 AM, Jay Hill jayallenh...@gmail.com wrote:

 If you need an alternative to using the TermsComponent for auto-suggest,
 have a look at this blog on using EdgeNGrams instead of the TermsComponent.


 http://www.lucidimagination.com/blog/2009/09/08/auto-suggest-from-popular-queries-using-edgengrams/

 -Jay
 http://www.lucidimagination.com


 On Wed, Sep 9, 2009 at 3:35 PM, Todd Benge todd.be...@gmail.com wrote:

  We're using the StandardAnalyzer but I'm fairly certain that's not the
  issue.
 
  In fact, I there doesn't appear to be any issue with Lucene or Solr.
  There
  are many instances of data in which users have removed the whitespace so
  they have a high frequency which means they bubble to the top of the
 sort.
  The result is that a search for a name shows a first and last name
 without
  the whitespace.
 
  One thing I've noticed is that since TermsComponent is working on a
 single
  Term, there doesn't seem to be a way to query against a phrase.  The same
  example as above applies, so if you're querying for name it'd be prefered
  to
  get multi-term responses back if a first name matches.
 
  Any suggestions?
 
  Thanks for all the help.  It's much appreciated.
 
  Todd
 
 
  On Wed, Sep 9, 2009 at 12:11 PM, Grant Ingersoll gsing...@apache.org
  wrote:
 
   And what Analyzer are you using?  I'm guessing that your words are
 being
   split up during analysis, which is why you aren't seeing whitespace.
  If
  you
   want to keep the whitespace, you will need to use the String field type
  or
   possibly the Keyword Analyzer.
  
   -Grant
  
  
   On Sep 9, 2009, at 11:06 AM, Todd Benge wrote:
  
It's set as Field.Store.YES, Field.Index.ANALYZED.
  
  
  
   On Wed, Sep 9, 2009 at 8:15 AM, Grant Ingersoll gsing...@apache.org
   wrote:
  
How are you tokenizing/analyzing the field you are accessing?
  
  
   On Sep 9, 2009, at 8:49 AM, Todd Benge wrote:
  
   Hi Rekha,
  
  
   Here's teh link to the TermsComponent info:
  
   http://wiki.apache.org/solr/TermsComponent
  
   and another link Matt Weber did on autocompletion:
  
  
  
  
 
 http://www.mattweber.org/2009/05/02/solr-autosuggest-with-termscomponent-and-jquery/
  
   We had to upgrade to the latest nightly to get the TermsComponent to
   work.
  
   Good Luck!
  
   Todd
  
   On Wed, Sep 9, 2009 at 5:17 AM, dharhsana 
 rekha.dharsh...@gmail.com
   wrote:
  
  
Hi,
  
   I have a requirement on Autocompletion search , iam using solr 1.4.
  
   Could you please tell me how you worked on that Terms component
 using
   solr
   1.4,
   i could'nt find terms component in solr 1.4 which i have
  downloaded,is
   there
   anyother configuration should be done.
  
   Do you have code for autocompletion, please share wih me..
  
   Regards
   Rekha
  
  
  
   tbenge wrote:
  
  
   Hi,
  
   I was looking at TermsComponent in Solr 1.4 as a way of building a
   autocomplete function.  I have a prototype working but noticed
 that
   terms
   that have whitespace in them when indexed are absent the
 whitespace
   when
   returned from the TermsComponent.
  
   Any ideas on why that may be happening?  Am I just missing a
  
configuration
  
option?
  
   Thanks,
  
   Todd
  
  
  
--
   View this message in context:
   http://www.nabble.com/TermsComponent-tp25302503p25362829.html
   Sent from the Solr - User mailing list archive at Nabble.com.
  
  
  
--
   Grant Ingersoll
   http://www.lucidimagination.com/
  
   Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids)
  using
   Solr/Lucene:
   http://www.lucidimagination.com/search
  
  
  
   --
   Grant Ingersoll
   http://www.lucidimagination.com/
  
   Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids)
 using
   Solr/Lucene:
   http://www.lucidimagination.com/search
  
  
 



Re: TermsComponent

2009-09-09 Thread dharhsana

Hi,

I have a requirement on Autocompletion search , iam using solr 1.4.

Could you please tell me how you worked on that Terms component using solr
1.4,
i could'nt find terms component in solr 1.4 which i have downloaded,is there
anyother configuration should be done.

Do you have code for autocompletion, please share wih me..

Regards
Rekha



tbenge wrote:
 
 Hi,
 
 I was looking at TermsComponent in Solr 1.4 as a way of building a
 autocomplete function.  I have a prototype working but noticed that terms
 that have whitespace in them when indexed are absent the whitespace when
 returned from the TermsComponent.
 
 Any ideas on why that may be happening?  Am I just missing a configuration
 option?
 
 Thanks,
 
 Todd
 
 

-- 
View this message in context: 
http://www.nabble.com/TermsComponent-tp25302503p25362829.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: TermsComponent

2009-09-09 Thread Todd Benge
Hi,

I tried setting the terms.raw param to true but didn't see any difference.
I did a little more digging and it appears the text in the TermEnum is
missing the whitespace inside Lucene so I'm not sure if it's because of the
way we're indexing the value or not.

One thing I noticed is we're indexing with Lucene 2.4 and Solr is using 2.9
rc2 in the nightly build.  Any chance that could be causing the problem?

Thanks,

Todd

On Sat, Sep 5, 2009 at 11:50 AM, Todd Benge todd.be...@gmail.com wrote:

 Thanks - I'll give it a try

 On 9/5/09, Yonik Seeley yo...@lucidimagination.com wrote:
  On Fri, Sep 4, 2009 at 5:46 PM, Todd Bengetodd.be...@gmail.com wrote:
  I was looking at TermsComponent in Solr 1.4 as a way of building a
  autocomplete function.  I have a prototype working but noticed that
 terms
  that have whitespace in them when indexed are absent the whitespace when
  returned from the TermsComponent.
 
  It works for me with the example data:
  http://localhost:8983/solr/terms?terms.fl=manu_exact
 
  -Yonik
  http://www.lucidimagination.com
 

 --
 Sent from my mobile device



Re: TermsComponent

2009-09-09 Thread Todd Benge
Hi Rekha,

Here's teh link to the TermsComponent info:

http://wiki.apache.org/solr/TermsComponent

and another link Matt Weber did on autocompletion:

http://www.mattweber.org/2009/05/02/solr-autosuggest-with-termscomponent-and-jquery/

We had to upgrade to the latest nightly to get the TermsComponent to work.

Good Luck!

Todd

On Wed, Sep 9, 2009 at 5:17 AM, dharhsana rekha.dharsh...@gmail.com wrote:


 Hi,

 I have a requirement on Autocompletion search , iam using solr 1.4.

 Could you please tell me how you worked on that Terms component using solr
 1.4,
 i could'nt find terms component in solr 1.4 which i have downloaded,is
 there
 anyother configuration should be done.

 Do you have code for autocompletion, please share wih me..

 Regards
 Rekha



 tbenge wrote:
 
  Hi,
 
  I was looking at TermsComponent in Solr 1.4 as a way of building a
  autocomplete function.  I have a prototype working but noticed that terms
  that have whitespace in them when indexed are absent the whitespace when
  returned from the TermsComponent.
 
  Any ideas on why that may be happening?  Am I just missing a
 configuration
  option?
 
  Thanks,
 
  Todd
 
 

 --
 View this message in context:
 http://www.nabble.com/TermsComponent-tp25302503p25362829.html
 Sent from the Solr - User mailing list archive at Nabble.com.




Re: TermsComponent

2009-09-09 Thread Grant Ingersoll

How are you tokenizing/analyzing the field you are accessing?

On Sep 9, 2009, at 8:49 AM, Todd Benge wrote:


Hi Rekha,

Here's teh link to the TermsComponent info:

http://wiki.apache.org/solr/TermsComponent

and another link Matt Weber did on autocompletion:

http://www.mattweber.org/2009/05/02/solr-autosuggest-with-termscomponent-and-jquery/

We had to upgrade to the latest nightly to get the TermsComponent to  
work.


Good Luck!

Todd

On Wed, Sep 9, 2009 at 5:17 AM, dharhsana  
rekha.dharsh...@gmail.com wrote:




Hi,

I have a requirement on Autocompletion search , iam using solr 1.4.

Could you please tell me how you worked on that Terms component  
using solr

1.4,
i could'nt find terms component in solr 1.4 which i have  
downloaded,is

there
anyother configuration should be done.

Do you have code for autocompletion, please share wih me..

Regards
Rekha



tbenge wrote:


Hi,

I was looking at TermsComponent in Solr 1.4 as a way of building a
autocomplete function.  I have a prototype working but noticed  
that terms
that have whitespace in them when indexed are absent the  
whitespace when

returned from the TermsComponent.

Any ideas on why that may be happening?  Am I just missing a

configuration

option?

Thanks,

Todd




--
View this message in context:
http://www.nabble.com/TermsComponent-tp25302503p25362829.html
Sent from the Solr - User mailing list archive at Nabble.com.




--
Grant Ingersoll
http://www.lucidimagination.com/

Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids)  
using Solr/Lucene:

http://www.lucidimagination.com/search



Re: TermsComponent

2009-09-09 Thread Todd Benge
It's set as Field.Store.YES, Field.Index.ANALYZED.



On Wed, Sep 9, 2009 at 8:15 AM, Grant Ingersoll gsing...@apache.org wrote:

 How are you tokenizing/analyzing the field you are accessing?


 On Sep 9, 2009, at 8:49 AM, Todd Benge wrote:

  Hi Rekha,

 Here's teh link to the TermsComponent info:

 http://wiki.apache.org/solr/TermsComponent

 and another link Matt Weber did on autocompletion:


 http://www.mattweber.org/2009/05/02/solr-autosuggest-with-termscomponent-and-jquery/

 We had to upgrade to the latest nightly to get the TermsComponent to work.

 Good Luck!

 Todd

 On Wed, Sep 9, 2009 at 5:17 AM, dharhsana rekha.dharsh...@gmail.com
 wrote:


 Hi,

 I have a requirement on Autocompletion search , iam using solr 1.4.

 Could you please tell me how you worked on that Terms component using
 solr
 1.4,
 i could'nt find terms component in solr 1.4 which i have downloaded,is
 there
 anyother configuration should be done.

 Do you have code for autocompletion, please share wih me..

 Regards
 Rekha



 tbenge wrote:


 Hi,

 I was looking at TermsComponent in Solr 1.4 as a way of building a
 autocomplete function.  I have a prototype working but noticed that
 terms
 that have whitespace in them when indexed are absent the whitespace when
 returned from the TermsComponent.

 Any ideas on why that may be happening?  Am I just missing a

 configuration

 option?

 Thanks,

 Todd



 --
 View this message in context:
 http://www.nabble.com/TermsComponent-tp25302503p25362829.html
 Sent from the Solr - User mailing list archive at Nabble.com.



 --
 Grant Ingersoll
 http://www.lucidimagination.com/

 Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids) using
 Solr/Lucene:
 http://www.lucidimagination.com/search




Re: TermsComponent

2009-09-09 Thread Grant Ingersoll
And what Analyzer are you using?  I'm guessing that your words are  
being split up during analysis, which is why you aren't seeing  
whitespace.  If you want to keep the whitespace, you will need to use  
the String field type or possibly the Keyword Analyzer.


-Grant

On Sep 9, 2009, at 11:06 AM, Todd Benge wrote:


It's set as Field.Store.YES, Field.Index.ANALYZED.



On Wed, Sep 9, 2009 at 8:15 AM, Grant Ingersoll  
gsing...@apache.org wrote:



How are you tokenizing/analyzing the field you are accessing?


On Sep 9, 2009, at 8:49 AM, Todd Benge wrote:

Hi Rekha,


Here's teh link to the TermsComponent info:

http://wiki.apache.org/solr/TermsComponent

and another link Matt Weber did on autocompletion:


http://www.mattweber.org/2009/05/02/solr-autosuggest-with-termscomponent-and-jquery/

We had to upgrade to the latest nightly to get the TermsComponent  
to work.


Good Luck!

Todd

On Wed, Sep 9, 2009 at 5:17 AM, dharhsana  
rekha.dharsh...@gmail.com

wrote:



Hi,

I have a requirement on Autocompletion search , iam using solr 1.4.

Could you please tell me how you worked on that Terms component  
using

solr
1.4,
i could'nt find terms component in solr 1.4 which i have  
downloaded,is

there
anyother configuration should be done.

Do you have code for autocompletion, please share wih me..

Regards
Rekha



tbenge wrote:



Hi,

I was looking at TermsComponent in Solr 1.4 as a way of building a
autocomplete function.  I have a prototype working but noticed  
that

terms
that have whitespace in them when indexed are absent the  
whitespace when

returned from the TermsComponent.

Any ideas on why that may be happening?  Am I just missing a


configuration


option?

Thanks,

Todd




--
View this message in context:
http://www.nabble.com/TermsComponent-tp25302503p25362829.html
Sent from the Solr - User mailing list archive at Nabble.com.




--
Grant Ingersoll
http://www.lucidimagination.com/

Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids)  
using

Solr/Lucene:
http://www.lucidimagination.com/search




--
Grant Ingersoll
http://www.lucidimagination.com/

Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids)  
using Solr/Lucene:

http://www.lucidimagination.com/search



Re: TermsComponent

2009-09-05 Thread Yonik Seeley
On Fri, Sep 4, 2009 at 5:46 PM, Todd Bengetodd.be...@gmail.com wrote:
 I was looking at TermsComponent in Solr 1.4 as a way of building a
 autocomplete function.  I have a prototype working but noticed that terms
 that have whitespace in them when indexed are absent the whitespace when
 returned from the TermsComponent.

It works for me with the example data:
http://localhost:8983/solr/terms?terms.fl=manu_exact

-Yonik
http://www.lucidimagination.com


Re: TermsComponent

2009-09-05 Thread Todd Benge
Thanks - I'll give it a try

On 9/5/09, Yonik Seeley yo...@lucidimagination.com wrote:
 On Fri, Sep 4, 2009 at 5:46 PM, Todd Bengetodd.be...@gmail.com wrote:
 I was looking at TermsComponent in Solr 1.4 as a way of building a
 autocomplete function.  I have a prototype working but noticed that terms
 that have whitespace in them when indexed are absent the whitespace when
 returned from the TermsComponent.

 It works for me with the example data:
 http://localhost:8983/solr/terms?terms.fl=manu_exact

 -Yonik
 http://www.lucidimagination.com


-- 
Sent from my mobile device


TermsComponent

2009-09-04 Thread Todd Benge
Hi,

I was looking at TermsComponent in Solr 1.4 as a way of building a
autocomplete function.  I have a prototype working but noticed that terms
that have whitespace in them when indexed are absent the whitespace when
returned from the TermsComponent.

Any ideas on why that may be happening?  Am I just missing a configuration
option?

Thanks,

Todd


Re: Compiling TermsComponent for use with Solr 1.3

2009-07-09 Thread Chris Hostetter

: I've copied TermsComponent and TermsParams from trunk into my own package
: and Eclipse isn't reporting any build errors
...
: SEVERE: java.lang.ClassCastException:
: com.titanpublishing.solr.TermsComponent cannot be cast to
: org.apache.solr.util.plugin.NamedListInitializedPlugin

TermsComponent extends SearchComponent which implements 
NamedListInitializedPlugin ... so if you are getting that error t run 
time, but you aren't getting any errors at compile time, that typically 
suggests that the classpath you compiled against isn't the same as your 
run time classpath -- there are probably differences in the 
NamedListInitializedPlugin between the version you are compiling against, 
and the version you are using at run time.


-Hoss



Compiling TermsComponent for use with Solr 1.3

2009-07-01 Thread Andrew Ingram
Hi all,

I'm interested in exploring the use of TermsComponent, but I don't want to
upgrade Solr to 1.4 until it's been officially released. I've tried
extracting the component and building it as an external lib but I'm having
problems getting it working.

I've copied TermsComponent and TermsParams from trunk into my own package
and Eclipse isn't reporting any build errors

The libs I'm using are:

apache-solr-common-1.3.0.jar
apache-solr-core-1.3.0.jar
lucene-core-2.4-dev.jar


I'm building the jar by exporting it from Eclipse.

But when I try and use it, solr gives an error at startup when it tries to
access the plugin.

Relevant solr conf;

searchComponent name=termsComponent class=my.package.TermsComponent /


The error is:

SEVERE: java.lang.ClassCastException:
com.titanpublishing.solr.TermsComponent cannot be cast to
org.apache.solr.util.plugin.NamedListInitializedPlugin


Any help would be much appreciated.

Regards,
Andrew Ingram


Termscomponent and filter queries

2009-06-22 Thread Ingo Renner

Hi *,

currently the terms component does not support filter queries.  
However, without them the returned count for the terms might differ to  
the actual results the user gets when conducting a search with a  
suggested word and (automatically) applied filter queries.


So, are there any plans to add filter query support to the terms  
component?



best
Ingo

--
Ingo Renner
TYPO3 Core Developer, Release Manager TYPO3 4.2





can the TermsComponent be used in combination with fq?

2009-02-16 Thread Peter Wolanin
We have been trying to figure out how to construct, for example, a
directory page with an overview of available facets for several
fields.

Looking at the issue and wiki

http://wiki.apache.org/solr/TermsComponent
https://issues.apache.org/jira/browse/SOLR-877

It would seem like this component would be useful for this.  However -
we often require that some filtering be applied to search results
based on which user is searching (e.g. public vs. private content).
Is it possible to apply filtering here, or will we need to do
something like running a q=*:*fq=status:1 and then getting facets?

Note - also - the wiki page references a tutorial including this
/autocomplete path, but I cannot ifnd any trace of such.  I was able
to get results similar to the examples on the wiki page by adding the
following to solrconfig.xml:

  searchComponent name=terms
class=org.apache.solr.handler.component.TermsComponent /
  !-- a request handler utilizing the elevator component --
  requestHandler name=/autocomplete class=solr.SearchHandler
startup=lazy
lst name=defaults
  str name=echoParamsexplicit/str
/lst
arr name=components
  strterms/str
/arr
  /requestHandler


Is this the right way to activate this?

Thanks,

Peter

-- 
Peter M. Wolanin, Ph.D.
Momentum Specialist,  Acquia. Inc.
peter.wola...@acquia.com


  1   2   >