Re: Spellcheck on specified fields?

2020-04-07 Thread TK Solr
Correction. "mark seattle" query doesn't show suggestions since "mark" alone has 
some hits.
It is when the same logic is used for a single term query of "seatle" that 3 
suggestions of "seattle"

are returned. Do I have to identify the field by using startOffset value?

On 4/7/20 3:46 PM, TK Solr wrote:

I query on multiple field like:

q=city:(mark seattle) name:(mark seattle) phone:(mark seattle)=true

The raw query terms are distributed to all fields because I don't know what 
term is intended to for which field.


If I misspell seattle, I get 3 suggestions:

"spellcheck":{
    "suggestions":[
  "seatle",{
    "numFound":1,
    "startOffset":29,
    "endOffset":35,
    "suggestion":["seattle"]},
  "seatle",{
    "numFound":1,
    "startOffset":50,
    "endOffset":56,
    "suggestion":["seattle"]},
  "seatle",{
    "numFound":1,
    "startOffset":73,
    "endOffset":79,
    "suggestion":["seattle"]}]}}

(Please disregard exact numbers. It's from more complicated query of the same 
nature.)


I think it's showing a correction suggestion for each query field.

Since the phone field keeps a phone number and spelling corrections are not 
very useful,
I would like the spellchecker to skip this and similar fields but I don't see 
a relevant

parameter in spellchecker's documentation. Is there any way to specify the
fields I am interested or I am not interested?

TK





RE: SpellCheck Reload

2018-03-16 Thread Sadiki Latty
Thanks Alessandro, I'll give this a try next time. I ended up deleting the 
spell folder after trying the reload option without success. Next time I will 
try the reload then build method you suggested.

Thanks again for the info.

-Original Message-
From: Alessandro Benedetti [mailto:a.benede...@sease.io] 
Sent: March-15-18 1:34 PM
To: solr-user@lucene.apache.org
Subject: RE: SpellCheck Reload

Hi Sadiki,
the kind of spellchecker you are using built an auxiliary Lucene index as a 
support data structure.
That is going to be used to provide the spellcheck suggestions.

"My question is, does "reloading the dictionary" mean completely erasing the 
current dictionary and starting from scratch (which is what I want)? "

What you want is re-build the spellchecker.
In the case of the the IndexBasedSpellChecker, the index is used to build the 
dictionary.
When the spellchecker is initialized a reader is opened from the latest index 
version available.

if in the meantime your index has changed and commits have happened, just 
building the spellchecker *should* use the old reader :

@Override
  public void build(SolrCore core, SolrIndexSearcher searcher) throws 
IOException {
IndexReader reader = null;
if (sourceLocation == null) {
  // Load from Solr's index
  reader = searcher.getIndexReader();
} else {
  // Load from Lucene index at given sourceLocation
  reader = this.reader;
}

This means your dictionary is not going to see any substantial changes.

So what you need to do is :

1) reload the spellchecker -> which will initialise again the source for the 
dictionary to the latest index commit
2) re-build the dictionary



Cheers







-
---
Alessandro Benedetti
Search Consultant, R Software Engineer, Director Sease Ltd. - www.sease.io
--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


RE: SpellCheck Reload

2018-03-15 Thread Alessandro Benedetti
Hi Sadiki,
the kind of spellchecker you are using built an auxiliary Lucene index as a
support data structure.
That is going to be used to provide the spellcheck suggestions.

"My question is, does "reloading the dictionary" mean completely erasing the
current dictionary and starting from scratch (which is what I want)? "

What you want is re-build the spellchecker.
In the case of the the IndexBasedSpellChecker, the index is used to build
the dictionary.
When the spellchecker is initialized a reader is opened from the latest
index version available.

if in the meantime your index has changed and commits have happened, just
building the spellchecker *should* use the old reader :

@Override
  public void build(SolrCore core, SolrIndexSearcher searcher) throws
IOException {
IndexReader reader = null;
if (sourceLocation == null) {
  // Load from Solr's index
  reader = searcher.getIndexReader();
} else {
  // Load from Lucene index at given sourceLocation
  reader = this.reader;
}

This means your dictionary is not going to see any substantial changes.

So what you need to do is :

1) reload the spellchecker -> which will initialise again the source for the
dictionary to the latest index commit
2) re-build the dictionary



Cheers







-
---
Alessandro Benedetti
Search Consultant, R Software Engineer, Director
Sease Ltd. - www.sease.io
--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


RE: SpellCheck Reload

2018-03-14 Thread Sadiki Latty
Hello,

Just bumping this question up regarding the spellcheck reload. Can anyone 
provide some insight on this question?


Thanks in advance

Sid

-Original Message-
From: Sadiki Latty [mailto:sla...@uottawa.ca] 
Sent: March-12-18 1:38 PM
To: solr-user@lucene.apache.org
Subject: SpellCheck Reload

Greetings list,

I had question regarding the spellcheck.reload parameter. I am using the 
IndexBasedSpellChecker which creates it's dictionary based on content from a 
field. I built the spell check (in error) with a field that has stemming and 
other filters associated to it.

Regarding the spellcheck.reload parameter, the guide states "If set to true, 
this parameter reloads the spellchecker. The results depend on the 
implementation of SolrSpellChecker.reload(). In a typical implementation, 
reloading the spellchecker means reloading the dictionary."

My question is, does "reloading the dictionary" mean completely erasing the 
current dictionary and starting from scratch (which is what I want), or does it 
simply reload the dictionary into some form of memory which would include what 
was there before (the stemmed and filtered data based on the initial field)?


Thanks,

Sid


Re: Spellcheck collations results

2018-02-08 Thread Alessandro Benedetti
Given this configurations you may state that if no collation is returned
there was no collation returning results after :
- getting back a maximum of 7 corrections for mispelled terms
- getting a max of 10.000 combinations of collations to extendedResults
- test 3 collations against the index to check if results are returned and
then give up

So there are scenarios where you don't get the collation, but it actually
would have returned results :

- the collation involve a correction that was not included in the closest 7
collations
- the collation was not tested ( not being included in the first 3 collation
combinations)

We can go more in deep if required, the Spellcheck is quite a complex module
:)

Cheers



-
---
Alessandro Benedetti
Search Consultant, R Software Engineer, Director
Sease Ltd. - www.sease.io
--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: Spellcheck collations results

2018-02-07 Thread Arnold Bronley
Thanks for replying Alessandro.

I am passing these parameters:

q=polt=polt=json=true=true=7=true=true=true=3=3=true=0.72





On Thu, Jan 25, 2018 at 4:28 AM, alessandro.benedetti 
wrote:

> Can you tell us the request parameters used for the spellcheck ?
>
> In particular are you using these ? (from the wiki) :
>
> " The *spellcheck.maxCollationTries* Parameter
> This parameter specifies the number of collation possibilities for Solr to
> try before giving up. Lower values ensure better performance. Higher values
> may be necessary to find a collation that can return results. The default
> value is 0, which maintains backwards-compatible (Solr 1.4) behavior (do
> not
> check collations). This parameter is ignored if spellcheck.collate is
> false.
>
> The *spellcheck.maxCollationEvaluations* Parameter
> This parameter specifies the maximum number of word correction combinations
> to rank and evaluate prior to deciding which collation candidates to test
> against the index. This is a performance safety-net in case a user enters a
> query with many misspelled words. The default is 10,000 combinations, which
> should work well in most situations. "
>
> Regards
>
>
>
>
>
> -
> ---
> Alessandro Benedetti
> Search Consultant, R Software Engineer, Director
> Sease Ltd. - www.sease.io
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>


Re: Spellcheck collations results

2018-01-25 Thread alessandro.benedetti
Can you tell us the request parameters used for the spellcheck ?

In particular are you using these ? (from the wiki) :

" The *spellcheck.maxCollationTries* Parameter
This parameter specifies the number of collation possibilities for Solr to
try before giving up. Lower values ensure better performance. Higher values
may be necessary to find a collation that can return results. The default
value is 0, which maintains backwards-compatible (Solr 1.4) behavior (do not
check collations). This parameter is ignored if spellcheck.collate is false.

The *spellcheck.maxCollationEvaluations* Parameter
This parameter specifies the maximum number of word correction combinations
to rank and evaluate prior to deciding which collation candidates to test
against the index. This is a performance safety-net in case a user enters a
query with many misspelled words. The default is 10,000 combinations, which
should work well in most situations. "

Regards





-
---
Alessandro Benedetti
Search Consultant, R Software Engineer, Director
Sease Ltd. - www.sease.io
--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: Spellcheck returning suggestions for words that exist in the dictionary

2017-11-13 Thread Sanjana Sridhar
Hi Alessandro,

I'm currently on Solr version 6.2.1, but will soon be moving to 6.6. I'm
not using DirectSolrSpellcheck, but using Index and File based.
The words I was testing against are definitely available in the File and
possibly in the Index as well.

What I found was if I don't set the maxResultsForSuggest field, Solr would
always try to spell correct. So for example,

Searching for "nike", gets corrected to "bike",

{"responseHeader":{"status":0,"QTime":2167,"params":{"spellcheck.q":"*nike*
","spellcheck":"true","wt":"json","spellcheck.build":"true","spellcheck.extendedResults":"true"}},"command":"build","response":{"numFound":0,"start":0,"docs":[]},"spellcheck":{"suggestions":["nike",{"numFound":1,"startOffset":0,"endOffset":4,"origFreq":0,"suggestion":[{"word":"
*bike*
","freq":-1}]}],"correctlySpelled":false,"collations":["collation","bike"]}}

But searching for "bike", gets corrected to "bake"

{"responseHeader":{"status":0,"QTime":2048,"params":{"spellcheck.q":"*bike*
","spellcheck":"true","wt":"json","spellcheck.build":"true","spellcheck.extendedResults":"true"}},"command":"build","response":{"numFound":0,"start":0,"docs":[]},"spellcheck":{"suggestions":["bike",{"numFound":1,"startOffset":0,"endOffset":4,"origFreq":0,"suggestion":[{"word":"
*bake*
","freq":-1}]}],"correctlySpelled":false,"collations":["collation","bake"]}}




On Mon, Nov 13, 2017 at 10:43 AM, alessandro.benedetti  wrote:

> Which Solr version are you using ?
>
> From the documentation :
> "Only query words, which are absent in index or too rare ones (below
> maxQueryFrequency ) are considered as misspelled and used for finding
> suggestions.
> ...
> These parameters (maxQueryFrequency and thresholdTokenFrequency) can be a
> percentage (such as .01, or 1%) or an absolute value (such as 4)."
>
> Checking in the latest source code[1] : public static final float
> DEFAULT_MAXQUERYFREQUENCY = 0.01f;
>
> This means that for the direct Solr Spellcheck, you should not get the
> suggestion if the term has a Document Frequency >=0.01 ( so if a term is in
> the index ) .
> Can you show us the snippet of the result you got ?
>
>
>
>
>
>
>
>
> -
> ---
> Alessandro Benedetti
> Search Consultant, R Software Engineer, Director
> Sease Ltd. - www.sease.io
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>



-- 

 

Sanjana Sridhar
Flipp Corporation

p: 226-600-2281
e: sanjana.srid...@flipp.com

-- 
IMPORTANT NOTICE:  This message, including any attachments (hereinafter 
collectively referred to as "Communication"), is intended only for the 
addressee(s) 
named above.  This Communication may include information that is 
privileged, confidential and exempt from disclosure under applicable law. 
 If the recipient of this Communication is not the intended recipient, or 
the employee or agent responsible for delivering this Communication to the 
intended recipient, you are notified that any dissemination, distribution 
or copying of this Communication is strictly prohibited.  If you have 
received this Communication in error, please notify the sender immediately 
by phone or email and permanently delete this Communication from your 
computer without making a copy. Thank you.


Re: Spellcheck returning suggestions for words that exist in the dictionary

2017-11-13 Thread alessandro.benedetti
Which Solr version are you using ?

>From the documentation : 
"Only query words, which are absent in index or too rare ones (below
maxQueryFrequency ) are considered as misspelled and used for finding
suggestions.
...
These parameters (maxQueryFrequency and thresholdTokenFrequency) can be a
percentage (such as .01, or 1%) or an absolute value (such as 4)."

Checking in the latest source code[1] : public static final float
DEFAULT_MAXQUERYFREQUENCY = 0.01f;

This means that for the direct Solr Spellcheck, you should not get the
suggestion if the term has a Document Frequency >=0.01 ( so if a term is in
the index ) .
Can you show us the snippet of the result you got ?








-
---
Alessandro Benedetti
Search Consultant, R Software Engineer, Director
Sease Ltd. - www.sease.io
--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: Spellcheck: using multiple dictionaries (DirectSolrSpellChecker and FileBasedSpellChecker)

2016-09-26 Thread Ryan Yacyshyn
Ok, thanks Andrey.



On Tue, 27 Sep 2016 at 00:13 Kydryavtsev Andrey  wrote:

> Hello, Ryan
>
>
> As it obvious from exception message - you are forced to use same instance
> of Analyzer to all of spell checkers which should be conjuncted.
>
> How this instance is initialized inside SpellChecker instance could be
> found here -
> https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/spelling/SolrSpellChecker.java#L65
>
> So one of possibilities to make it work - use same field for both spell
> checkers. solrconfig.xml could looks like this:
>
>   
> default
> solr.DirectSolrSpellChecker
> field_for_spell_check
> …
> 
>
>
> 
> wordbreak
> solr.WordBreakSolrSpellChecker
>  field_for_spell_check 
>   ….
> 
>
> 23.09.2016, 12:13, "Ryan Yacyshyn" :
> > Hi everyone,
> >
> > I'm looking at using two different implementations of spell checking
> > together: DirectSolrSpellChecker and FileBasedSpellChecker but I get the
> > following error:
> >
> > msg: "All checkers need to use the same Analyzer.",
> > trace: "java.lang.IllegalArgumentException: All checkers need to use the
> > same Analyzer. at
> >
> org.apache.solr.spelling.ConjunctionSolrSpellChecker.addChecker(ConjunctionSolrSpellChecker.java:79)
> > at
> >
> org.apache.solr.handler.component.SpellCheckComponent.getSpellChecker(SpellCheckComponent.java:603)
> > at
> >
> org.apache.solr.handler.component.SpellCheckComponent.prepare(SpellCheckComponent.java:126)
> > at ...
> >
> > The source mentions that the "initial use-case was to use
> > WordBreakSolrSpellChecker in conjunction with the
> DirectSolrSpellChecker".
> >
> > If I make a query with only of the dictionaries (file or direct), they
> both
> > work fine, combining them into one query throws the error. I'm not sure
> if
> > I'm doing something wrong or if I just can't use these two together
> (yet).
> >
> > I'm using 6.2.0. Thanks for any help!
> >
> > Ryan
>


Re: Spellcheck: using multiple dictionaries (DirectSolrSpellChecker and FileBasedSpellChecker)

2016-09-26 Thread Kydryavtsev Andrey
Hello, Ryan


As it obvious from exception message - you are forced to use same instance of 
Analyzer to all of spell checkers which should be conjuncted.

How this instance is initialized inside SpellChecker instance could be found 
here - 
https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/spelling/SolrSpellChecker.java#L65

So one of possibilities to make it work - use same field for both spell 
checkers. solrconfig.xml could looks like this:

  
            default
            solr.DirectSolrSpellChecker
            field_for_spell_check
        …
        


        
            wordbreak
            solr.WordBreakSolrSpellChecker
             field_for_spell_check 
              ….
        

23.09.2016, 12:13, "Ryan Yacyshyn" :
> Hi everyone,
>
> I'm looking at using two different implementations of spell checking
> together: DirectSolrSpellChecker and FileBasedSpellChecker but I get the
> following error:
>
> msg: "All checkers need to use the same Analyzer.",
> trace: "java.lang.IllegalArgumentException: All checkers need to use the
> same Analyzer. at
> org.apache.solr.spelling.ConjunctionSolrSpellChecker.addChecker(ConjunctionSolrSpellChecker.java:79)
> at
> org.apache.solr.handler.component.SpellCheckComponent.getSpellChecker(SpellCheckComponent.java:603)
> at
> org.apache.solr.handler.component.SpellCheckComponent.prepare(SpellCheckComponent.java:126)
> at ...
>
> The source mentions that the "initial use-case was to use
> WordBreakSolrSpellChecker in conjunction with the DirectSolrSpellChecker".
>
> If I make a query with only of the dictionaries (file or direct), they both
> work fine, combining them into one query throws the error. I'm not sure if
> I'm doing something wrong or if I just can't use these two together (yet).
>
> I'm using 6.2.0. Thanks for any help!
>
> Ryan


RE: Spellcheck response format differs between a single core and SolrCloud

2016-01-11 Thread Dyer, James
Ryan,

The json response format changed for Solr 5.0.  See 
https://issues.apache.org/jira/browse/SOLR-3029 .  Is the single-core solr 
running a 4.x version with the cloud solr running 5.x ?  If they are both on 
the same major version, then we have a bug.

James Dyer
Ingram Content Group


-Original Message-
From: Ryan Yacyshyn [mailto:ryan.yacys...@gmail.com] 
Sent: Monday, January 11, 2016 12:32 AM
To: solr-user@lucene.apache.org
Subject: Spellcheck response format differs between a single core and SolrCloud

Hello,

I am using the spellcheck component for spelling suggestions and I've used
the same configurations in two separate projects, the only difference is
one project uses a single core and the other is a collection on SolrCloud
with three shards. The single core has about 56K docs and the one on
SolrCloud has 1M docs. Strangely, the format of the response is slightly
different between the two and I'm not sure why (particularly the collations
part). Was wondering if any can shed some light on this? Below is my
configuration and the results I'm getting.

This is in my "/select" searchHandler:


on
false
5
2
5
true
true
5
3

And my spellcheck component:



  
  
default
spelling
solr.DirectSolrSpellChecker
internal
0.5
2
1
5
4
0.01
  


Examples of each output can be found here:
https://gist.github.com/ryac/ceff8da00ec9f5b84106

Thanks,
Ryan


Re: Spellcheck response format differs between a single core and SolrCloud

2016-01-11 Thread Ryan Yacyshyn
That's solves the mystery. The single-core is running 4.10.1 and SolrCloud
on 5.3.1.

Thanks James.



On Mon, 11 Jan 2016 at 22:24 Dyer, James 
wrote:

> Ryan,
>
> The json response format changed for Solr 5.0.  See
> https://issues.apache.org/jira/browse/SOLR-3029 .  Is the single-core
> solr running a 4.x version with the cloud solr running 5.x ?  If they are
> both on the same major version, then we have a bug.
>
> James Dyer
> Ingram Content Group
>
>
> -Original Message-
> From: Ryan Yacyshyn [mailto:ryan.yacys...@gmail.com]
> Sent: Monday, January 11, 2016 12:32 AM
> To: solr-user@lucene.apache.org
> Subject: Spellcheck response format differs between a single core and
> SolrCloud
>
> Hello,
>
> I am using the spellcheck component for spelling suggestions and I've used
> the same configurations in two separate projects, the only difference is
> one project uses a single core and the other is a collection on SolrCloud
> with three shards. The single core has about 56K docs and the one on
> SolrCloud has 1M docs. Strangely, the format of the response is slightly
> different between the two and I'm not sure why (particularly the collations
> part). Was wondering if any can shed some light on this? Below is my
> configuration and the results I'm getting.
>
> This is in my "/select" searchHandler:
>
> 
> on
> false
> 5
> 2
> 5
> true
> true
> 5
> 3
>
> And my spellcheck component:
>
> 
> 
>   
>   
> default
> spelling
> solr.DirectSolrSpellChecker
> internal
> 0.5
> 2
> 1
> 5
> 4
> 0.01
>   
> 
>
> Examples of each output can be found here:
> https://gist.github.com/ryac/ceff8da00ec9f5b84106
>
> Thanks,
> Ryan
>


RE: Spellcheck error

2015-12-03 Thread Dyer, James
Matt,

Can you give some information about how your spellcheck field is analyzed and 
also if you're using a custom query converter.  Also, try and place the bare 
terms you want checked in spellcheck.q (ex, if your query is q=+movie +theatre, 
then spellcheck.q=movie theatre).  Does it work in this case?  Also, could you 
give the exact query you're using?

This is the very same bug as in the 3 tickets you mention.  We clearly haven't 
solved all of the possible ways this bug can be triggered.  But we cannot fix 
this unless we can come up with a unit test that reliably reproduces it.  At 
the very least, we should handle these problems better than throwing SIOOB like 
this.

Long term, there is probably a better design we could come up with for how 
terms are identified within queries and how collations are generated.

James Dyer
Ingram Content Group


-Original Message-
From: Matt Pearce [mailto:m...@flax.co.uk] 
Sent: Thursday, December 03, 2015 10:40 AM
To: solr-user
Subject: Spellcheck error

Hi,

We're using Solr 5.3.1, and we're getting a 
StringIndexOutOfBoundsException from the SpellCheckCollator. I've done 
some investigation, and it looks like the problem is that the corrected 
string is shorter than the original query.

For example, the search term is "theatre", the suggested correction is 
"there". The error is being thrown when replacing the original query 
with the shorter replacement.

This is the stack trace:
java.lang.StringIndexOutOfBoundsException: String index out of range: -2
 at 
java.lang.AbstractStringBuilder.replace(AbstractStringBuilder.java:824)
 at java.lang.StringBuilder.replace(StringBuilder.java:262)
 at 
org.apache.solr.spelling.SpellCheckCollator.getCollation(SpellCheckCollator.java:235)
 at 
org.apache.solr.spelling.SpellCheckCollator.collate(SpellCheckCollator.java:92)
 at 
org.apache.solr.handler.component.SpellCheckComponent.addCollationsToResponse(SpellCheckComponent.java:237)
 at 
org.apache.solr.handler.component.SpellCheckComponent.process(SpellCheckComponent.java:202)
 at 
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:277)

The error looks very similar to those described in 
https://issues.apache.org/jira/browse/SOLR-4489, 
https://issues.apache.org/jira/browse/SOLR-3608 and 
https://issues.apache.org/jira/browse/SOLR-2509, most of which are closed.

Any suggestions would be appreciated, or should I open a JIRA ticket?

Thanks,

Matt

-- 
Matt Pearce
Flax - Open Source Enterprise Search
www.flax.co.uk



Re: Spellcheck error

2015-12-03 Thread Matt Pearce

Hi James,

Thanks for responding.

The query we were testing looks like this:
http://localhost:8983/solr/testdata/select?q=theatre=theatre

I did some further investigation, after discovering that omitting the 
spellcheck.q parameter stops the error appearing, and it looks like 
synonym expansion is playing a part in the problem. The spellcheck field 
is essentially the same as text_general in the example schema, with the 
substitution of HTMLStripCharFilterFactory instead of the 
StandardTokenizerFactory at index time:


positionIncrementGap="100">

  


words="stopwords.txt" />


  
  

words="stopwords.txt" />
synonyms="synonyms.txt" ignoreCase="true" expand="true"/>


  


With synonyms enabled, spellcheck.q=theatre is being expanded to seven 
tokens - theatre (3 times), theater, playhouse, studio and workshop. If 
I disable synonyms in the query analyser, "theatre" is used on its own, 
and the error doesn't happen (this is the same behaviour as when I omit 
spellcheck.q).


So, it looks like the quick solution is to disable synonyms in the query 
analyser for that field. I'll do some further investigation tomorrow to 
see if I can figure out why the synonym expansion triggers the problem 
while neither "theatre" nor "theater" on their own do (I can't imagine 
the other three variants are going to make "there" appear as a spelling 
correction).


Cheers,

Matt

On 03/12/15 18:53, Dyer, James wrote:

Matt,

Can you give some information about how your spellcheck field is analyzed and 
also if you're using a custom query converter.  Also, try and place the bare 
terms you want checked in spellcheck.q (ex, if your query is q=+movie +theatre, 
then spellcheck.q=movie theatre).  Does it work in this case?  Also, could you 
give the exact query you're using?

This is the very same bug as in the 3 tickets you mention.  We clearly haven't 
solved all of the possible ways this bug can be triggered.  But we cannot fix 
this unless we can come up with a unit test that reliably reproduces it.  At 
the very least, we should handle these problems better than throwing SIOOB like 
this.

Long term, there is probably a better design we could come up with for how 
terms are identified within queries and how collations are generated.

James Dyer
Ingram Content Group


-Original Message-
From: Matt Pearce [mailto:m...@flax.co.uk]
Sent: Thursday, December 03, 2015 10:40 AM
To: solr-user
Subject: Spellcheck error

Hi,

We're using Solr 5.3.1, and we're getting a
StringIndexOutOfBoundsException from the SpellCheckCollator. I've done
some investigation, and it looks like the problem is that the corrected
string is shorter than the original query.

For example, the search term is "theatre", the suggested correction is
"there". The error is being thrown when replacing the original query
with the shorter replacement.

This is the stack trace:
java.lang.StringIndexOutOfBoundsException: String index out of range: -2
  at
java.lang.AbstractStringBuilder.replace(AbstractStringBuilder.java:824)
  at java.lang.StringBuilder.replace(StringBuilder.java:262)
  at
org.apache.solr.spelling.SpellCheckCollator.getCollation(SpellCheckCollator.java:235)
  at
org.apache.solr.spelling.SpellCheckCollator.collate(SpellCheckCollator.java:92)
  at
org.apache.solr.handler.component.SpellCheckComponent.addCollationsToResponse(SpellCheckComponent.java:237)
  at
org.apache.solr.handler.component.SpellCheckComponent.process(SpellCheckComponent.java:202)
  at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:277)

The error looks very similar to those described in
https://issues.apache.org/jira/browse/SOLR-4489,
https://issues.apache.org/jira/browse/SOLR-3608 and
https://issues.apache.org/jira/browse/SOLR-2509, most of which are closed.

Any suggestions would be appreciated, or should I open a JIRA ticket?

Thanks,

Matt



--
Matt Pearce
Flax - Open Source Enterprise Search
www.flax.co.uk



Re: Spellcheck on first character

2015-11-30 Thread Alessandro Benedetti
Good to know Markus !!

Cheers

On 28 November 2015 at 01:11, Ryan Yacyshyn <ryan.yacys...@gmail.com> wrote:

> Thanks Markus, missed that. I'll try it out.
>
>
> On Sat, 28 Nov 2015 at 00:47 Markus Jelsma <markus.jel...@openindex.io>
> wrote:
>
> > Hi - this is default behaviour, see
> >
> https://lucene.apache.org/core/4_1_0/suggest/org/apache/lucene/search/spell/DirectSpellChecker.html#setMinPrefix%28int%29
> > lucky for you it is configurable via Solr:
> >
> http://lucene.apache.org/solr/5_3_0/solr-core/org/apache/solr/spelling/DirectSolrSpellChecker.html
> >
> >
> >
> > -Original message-
> > > From:Ryan Yacyshyn <ryan.yacys...@gmail.com>
> > > Sent: Friday 27th November 2015 15:44
> > > To: solr-user@lucene.apache.org
> > > Subject: Re: Spellcheck on first character
> > >
> > > hmm.. I must be missing something then. I do get spelling suggestions
> if
> > I
> > > make a mistake anywhere *after* the first character (eg: apointment or
> > > apppointment or apppointmenz). But if there's only an additional
> > character
> > > in front, I get nothing back. Have you tried this?
> > >
> > > I did try an online Levenshtein calculator and results were as expected
> > - 1
> > > edit distance away when an additional char is in front.
> > >
> > >
> > >
> > >
> > > On Fri, 27 Nov 2015 at 19:50 Alessandro Benedetti <
> abenede...@apache.org
> > >
> > > wrote:
> > >
> > > > Hi Ryan,
> > > > "eappointment" has a Leveinstein distance of 1 edit from
> "appointment"
> > ( 1
> > > > insertion) .
> > > > There's should be any problem to provide that suggestion, as the solr
> > > > spellcheck supports up to 2 edits as a maximum distance.
> > > >
> > > > Cheers
> > > >
> > > > On 27 November 2015 at 03:41, Ryan Yacyshyn <ryan.yacys...@gmail.com
> >
> > > > wrote:
> > > >
> > > > > Hi all,
> > > > >
> > > > > Is it possible to provide spelling suggestions if it's just the
> first
> > > > > character that's wrong (or has an additional character added)?
> > > > >
> > > > > We have users querying for "eappointment" when they should just be
> > > > > searching for "appointment". I'd like to show "appointment" as a
> > spelling
> > > > > suggestion for "eappointment".
> > > > >
> > > > > Is this possible?
> > > > >
> > > > > I'm using 4.10.1 and below are my configs:
> > > > >
> > > > > **
> > > > > on
> > > > > false
> > > > > 1
> > > > > 1
> > > > > 1
> > > > > true
> > > > > false
> > > > > 5
> > > > > 1
> > > > >
> > > > > **
> > > > >  class="solr.SpellCheckComponent">
> > > > >   
> > > > >   
> > > > > default
> > > > > spell
> > > > > solr.DirectSolrSpellChecker
> > > > > 
> > > > > internal
> > > > > 
> > > > > 0.5
> > > > > 
> > > > > 2
> > > > > 
> > > > > 1
> > > > > 
> > > > > 5
> > > > > 
> > > > > 4
> > > > > 
> > > > > 0.01
> > > > >   
> > > > > 
> > > > >
> > > > > Thanks,
> > > > > Ryan
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > --
> > > >
> > > > Benedetti Alessandro
> > > > Visiting card : http://about.me/alessandro_benedetti
> > > >
> > > > "Tyger, tyger burning bright
> > > > In the forests of the night,
> > > > What immortal hand or eye
> > > > Could frame thy fearful symmetry?"
> > > >
> > > > William Blake - Songs of Experience -1794 England
> > > >
> > >
> >
>



-- 
--

Benedetti Alessandro
Visiting card : http://about.me/alessandro_benedetti

"Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?"

William Blake - Songs of Experience -1794 England


RE: Spellcheck on first character

2015-11-27 Thread Markus Jelsma
Hi - this is default behaviour, see 
https://lucene.apache.org/core/4_1_0/suggest/org/apache/lucene/search/spell/DirectSpellChecker.html#setMinPrefix%28int%29
 lucky for you it is configurable via Solr: 
http://lucene.apache.org/solr/5_3_0/solr-core/org/apache/solr/spelling/DirectSolrSpellChecker.html

 
 
-Original message-
> From:Ryan Yacyshyn <ryan.yacys...@gmail.com>
> Sent: Friday 27th November 2015 15:44
> To: solr-user@lucene.apache.org
> Subject: Re: Spellcheck on first character
> 
> hmm.. I must be missing something then. I do get spelling suggestions if I
> make a mistake anywhere *after* the first character (eg: apointment or
> apppointment or apppointmenz). But if there's only an additional character
> in front, I get nothing back. Have you tried this?
> 
> I did try an online Levenshtein calculator and results were as expected - 1
> edit distance away when an additional char is in front.
> 
> 
> 
> 
> On Fri, 27 Nov 2015 at 19:50 Alessandro Benedetti <abenede...@apache.org>
> wrote:
> 
> > Hi Ryan,
> > "eappointment" has a Leveinstein distance of 1 edit from "appointment" ( 1
> > insertion) .
> > There's should be any problem to provide that suggestion, as the solr
> > spellcheck supports up to 2 edits as a maximum distance.
> >
> > Cheers
> >
> > On 27 November 2015 at 03:41, Ryan Yacyshyn <ryan.yacys...@gmail.com>
> > wrote:
> >
> > > Hi all,
> > >
> > > Is it possible to provide spelling suggestions if it's just the first
> > > character that's wrong (or has an additional character added)?
> > >
> > > We have users querying for "eappointment" when they should just be
> > > searching for "appointment". I'd like to show "appointment" as a spelling
> > > suggestion for "eappointment".
> > >
> > > Is this possible?
> > >
> > > I'm using 4.10.1 and below are my configs:
> > >
> > > **
> > > on
> > > false
> > > 1
> > > 1
> > > 1
> > > true
> > > false
> > > 5
> > > 1
> > >
> > > **
> > > 
> > >   
> > >   
> > > default
> > > spell
> > > solr.DirectSolrSpellChecker
> > > 
> > > internal
> > > 
> > > 0.5
> > > 
> > > 2
> > > 
> > > 1
> > > 
> > > 5
> > > 
> > > 4
> > > 
> > > 0.01
> > >   
> > > 
> > >
> > > Thanks,
> > > Ryan
> > >
> >
> >
> >
> > --
> > --
> >
> > Benedetti Alessandro
> > Visiting card : http://about.me/alessandro_benedetti
> >
> > "Tyger, tyger burning bright
> > In the forests of the night,
> > What immortal hand or eye
> > Could frame thy fearful symmetry?"
> >
> > William Blake - Songs of Experience -1794 England
> >
> 


Re: Spellcheck on first character

2015-11-27 Thread Alessandro Benedetti
Hi Ryan,
"eappointment" has a Leveinstein distance of 1 edit from "appointment" ( 1
insertion) .
There's should be any problem to provide that suggestion, as the solr
spellcheck supports up to 2 edits as a maximum distance.

Cheers

On 27 November 2015 at 03:41, Ryan Yacyshyn  wrote:

> Hi all,
>
> Is it possible to provide spelling suggestions if it's just the first
> character that's wrong (or has an additional character added)?
>
> We have users querying for "eappointment" when they should just be
> searching for "appointment". I'd like to show "appointment" as a spelling
> suggestion for "eappointment".
>
> Is this possible?
>
> I'm using 4.10.1 and below are my configs:
>
> **
> on
> false
> 1
> 1
> 1
> true
> false
> 5
> 1
>
> **
> 
>   
>   
> default
> spell
> solr.DirectSolrSpellChecker
> 
> internal
> 
> 0.5
> 
> 2
> 
> 1
> 
> 5
> 
> 4
> 
> 0.01
>   
> 
>
> Thanks,
> Ryan
>



-- 
--

Benedetti Alessandro
Visiting card : http://about.me/alessandro_benedetti

"Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?"

William Blake - Songs of Experience -1794 England


Re: Spellcheck on first character

2015-11-27 Thread Ryan Yacyshyn
hmm.. I must be missing something then. I do get spelling suggestions if I
make a mistake anywhere *after* the first character (eg: apointment or
apppointment or apppointmenz). But if there's only an additional character
in front, I get nothing back. Have you tried this?

I did try an online Levenshtein calculator and results were as expected - 1
edit distance away when an additional char is in front.




On Fri, 27 Nov 2015 at 19:50 Alessandro Benedetti 
wrote:

> Hi Ryan,
> "eappointment" has a Leveinstein distance of 1 edit from "appointment" ( 1
> insertion) .
> There's should be any problem to provide that suggestion, as the solr
> spellcheck supports up to 2 edits as a maximum distance.
>
> Cheers
>
> On 27 November 2015 at 03:41, Ryan Yacyshyn 
> wrote:
>
> > Hi all,
> >
> > Is it possible to provide spelling suggestions if it's just the first
> > character that's wrong (or has an additional character added)?
> >
> > We have users querying for "eappointment" when they should just be
> > searching for "appointment". I'd like to show "appointment" as a spelling
> > suggestion for "eappointment".
> >
> > Is this possible?
> >
> > I'm using 4.10.1 and below are my configs:
> >
> > **
> > on
> > false
> > 1
> > 1
> > 1
> > true
> > false
> > 5
> > 1
> >
> > **
> > 
> >   
> >   
> > default
> > spell
> > solr.DirectSolrSpellChecker
> > 
> > internal
> > 
> > 0.5
> > 
> > 2
> > 
> > 1
> > 
> > 5
> > 
> > 4
> > 
> > 0.01
> >   
> > 
> >
> > Thanks,
> > Ryan
> >
>
>
>
> --
> --
>
> Benedetti Alessandro
> Visiting card : http://about.me/alessandro_benedetti
>
> "Tyger, tyger burning bright
> In the forests of the night,
> What immortal hand or eye
> Could frame thy fearful symmetry?"
>
> William Blake - Songs of Experience -1794 England
>


Re: Spellcheck on first character

2015-11-27 Thread Ryan Yacyshyn
Thanks Markus, missed that. I'll try it out.


On Sat, 28 Nov 2015 at 00:47 Markus Jelsma <markus.jel...@openindex.io>
wrote:

> Hi - this is default behaviour, see
> https://lucene.apache.org/core/4_1_0/suggest/org/apache/lucene/search/spell/DirectSpellChecker.html#setMinPrefix%28int%29
> lucky for you it is configurable via Solr:
> http://lucene.apache.org/solr/5_3_0/solr-core/org/apache/solr/spelling/DirectSolrSpellChecker.html
>
>
>
> -Original message-
> > From:Ryan Yacyshyn <ryan.yacys...@gmail.com>
> > Sent: Friday 27th November 2015 15:44
> > To: solr-user@lucene.apache.org
> > Subject: Re: Spellcheck on first character
> >
> > hmm.. I must be missing something then. I do get spelling suggestions if
> I
> > make a mistake anywhere *after* the first character (eg: apointment or
> > apppointment or apppointmenz). But if there's only an additional
> character
> > in front, I get nothing back. Have you tried this?
> >
> > I did try an online Levenshtein calculator and results were as expected
> - 1
> > edit distance away when an additional char is in front.
> >
> >
> >
> >
> > On Fri, 27 Nov 2015 at 19:50 Alessandro Benedetti <abenede...@apache.org
> >
> > wrote:
> >
> > > Hi Ryan,
> > > "eappointment" has a Leveinstein distance of 1 edit from "appointment"
> ( 1
> > > insertion) .
> > > There's should be any problem to provide that suggestion, as the solr
> > > spellcheck supports up to 2 edits as a maximum distance.
> > >
> > > Cheers
> > >
> > > On 27 November 2015 at 03:41, Ryan Yacyshyn <ryan.yacys...@gmail.com>
> > > wrote:
> > >
> > > > Hi all,
> > > >
> > > > Is it possible to provide spelling suggestions if it's just the first
> > > > character that's wrong (or has an additional character added)?
> > > >
> > > > We have users querying for "eappointment" when they should just be
> > > > searching for "appointment". I'd like to show "appointment" as a
> spelling
> > > > suggestion for "eappointment".
> > > >
> > > > Is this possible?
> > > >
> > > > I'm using 4.10.1 and below are my configs:
> > > >
> > > > **
> > > > on
> > > > false
> > > > 1
> > > > 1
> > > > 1
> > > > true
> > > > false
> > > > 5
> > > > 1
> > > >
> > > > **
> > > > 
> > > >   
> > > >   
> > > > default
> > > > spell
> > > > solr.DirectSolrSpellChecker
> > > > 
> > > > internal
> > > > 
> > > > 0.5
> > > > 
> > > > 2
> > > > 
> > > > 1
> > > > 
> > > > 5
> > > > 
> > > > 4
> > > > 
> > > > 0.01
> > > >   
> > > > 
> > > >
> > > > Thanks,
> > > > Ryan
> > > >
> > >
> > >
> > >
> > > --
> > > --
> > >
> > > Benedetti Alessandro
> > > Visiting card : http://about.me/alessandro_benedetti
> > >
> > > "Tyger, tyger burning bright
> > > In the forests of the night,
> > > What immortal hand or eye
> > > Could frame thy fearful symmetry?"
> > >
> > > William Blake - Songs of Experience -1794 England
> > >
> >
>


RE: Spellcheck / Suggestions : Append custom dictionary to SOLR default index

2015-08-25 Thread Dyer, James
Max,

If you know the entire list of words you want to spellcheck against, you can 
use FileBasedSpellChecker.  See 
http://wiki.apache.org/solr/FileBasedSpellChecker .

If, however, you have a field you want to spellcheck against but also want 
additional words added, consider using a copy of the field for spellcheck 
purposes, and then index the additional terms to that field.   You may be able 
to accomplish this easily, for instance, by using index-time synonyms in the 
analysis chain for the spellcheck field.  Or you could just append them to any 
document (more than once if you want to boost the term frequency).

Keep in mind that while this will work fine for regular word-by-word spell 
suggestions, collations are not going to work well with these approaches.

James Dyer
Ingram Content Group

-Original Message-
From: Max Chadwick [mailto:mpchadw...@gmail.com] 
Sent: Monday, August 24, 2015 9:43 PM
To: solr-user@lucene.apache.org
Subject: Spellcheck / Suggestions : Append custom dictionary to SOLR default 
index

Is there a way to append a set of words the the out-of-box solr index when
using the spellcheck / suggestions feature?


Re: spellcheck enabled but not getting any suggestions.

2015-04-17 Thread elisabeth benoit
Shouldn't you specify a spellcheck.dictionary in your request handler?

Best regards,
Elisabeth

2015-04-17 11:24 GMT+02:00 Derek Poh d...@globalsources.com:

 Hi

 I have enabled spellcheck but not getting any suggestions withincorrectly
 spelled keywords.
 I added the spellcheck into the/select request handler.

 What steps did I miss out?

 spellcheck list in return result:
 lst name=spellcheck
 lst name=suggestions/
 /lst


 solrconfig.xml:

 requestHandler name=/select class=solr.SearchHandler
 !-- default values for query parameters can be specified, these
  will be overridden by parameters in the request
   --
  lst name=defaults
str name=echoParamsexplicit/str
int name=rows10/int
str name=dftext/str
!-- Spell checking defaults --
str name=spellcheckon/str
str name=spellcheck.extendedResultsfalse/str
str name=spellcheck.count5/str
str name=spellcheck.alternativeTermCount2/str
str name=spellcheck.maxResultsForSuggest5/str
str name=spellcheck.collatetrue/str
str name=spellcheck.collateExtendedResultstrue/str
str name=spellcheck.maxCollationTries5/str
str name=spellcheck.maxCollations3/str
  /lst

  !-- append spellchecking to our list of components --
  arr name=last-components
 strspellcheck/str
  /arr

 /requestHandler





RE: SpellCheck component query

2015-03-09 Thread Reitzel, Charles
Hi Ashish,

We are doing some very close to what you describe.   As Aman says, it requires 
two solr queries to achieve that result.   

I.e. you need to build this logic into your application.  Solr won't do it for 
you.In our case, for the second query, we use a faceted results against an 
ngram filtered field to get valid terms.

hth,
Charlie

-Original Message-
From: Ashish Mukherjee [mailto:ashish.mukher...@gmail.com] 
Sent: Monday, March 09, 2015 1:55 AM
To: solr-user@lucene.apache.org
Cc: amantandon...@gmail.com
Subject: Re: SpellCheck component query

Hi Aman,

Thanks for your response.

Taking your example further to elaborate what I am looking to do -

if user types 'chai' and suggestion is 'chat' , then I would like to see all 
the values which 'chat' in them as suggestions, such as 'text chat', 'video 
chat', 'audio chat' etc. without making another search request for 'chat'.

Can this be accomplished?

Regards,
Ashish

On Mon, Mar 9, 2015 at 2:50 AM, Aman Tandon amantandon...@gmail.com wrote:

 Hi,

 AFAIK solr currently not providing this feature.

 Suppose a scenario, the user is trying to search for chai (hindi 
 meaning of tea). And in your index you have more documents containing 
 the keyword chat as compared to the the keyword chai.

 chat = 501
 chai = 29

 and the maxQueryFrequency is 25.

 So solr will suggest you chat as this term is present in more 
 documents and if you want from solr to search internally for the 
 suggestion then you will be displaying he results of chat to the user 
 when the user intended to search for chai.

 So I suppose it is good to show wrong suggestion instead of providing 
 the inappropriate results to the user.

 In this case you could the show the chat and chai as suggestion to the 
 user and then he could select the appropriate suggestion.

 With Regards
 Aman Tandon

 On Sat, Mar 7, 2015 at 7:57 PM, Ashish Mukherjee  
 ashish.mukher...@gmail.com
  wrote:

  Hello,
 
  I have enabled the Spellcheck component in Solr, which gives me 
  spelling suggestions. However, I would like those suggestions to be 
  applied in the same select request handler to retrieve additional 
  results based on the suggestions. How can this be achieved with Solr?
 
  Regards,
  Ashish
 


*
This e-mail may contain confidential or privileged information.
If you are not the intended recipient, please notify the sender immediately and 
then delete it.

TIAA-CREF
*


Re: SpellCheck component query

2015-03-08 Thread Aman Tandon
Hi,

AFAIK solr currently not providing this feature.

Suppose a scenario, the user is trying to search for chai (hindi meaning
of tea). And in your index you have more documents containing the keyword
chat as compared to the the keyword chai.

chat = 501
chai = 29

and the maxQueryFrequency is 25.

So solr will suggest you chat as this term is present in more documents and
if you want from solr to search internally for the suggestion then you will
be displaying he results of chat to the user when the user intended to
search for chai.

So I suppose it is good to show wrong suggestion instead of providing the
inappropriate results to the user.

In this case you could the show the chat and chai as suggestion to the user
and then he could select the appropriate suggestion.

With Regards
Aman Tandon

On Sat, Mar 7, 2015 at 7:57 PM, Ashish Mukherjee ashish.mukher...@gmail.com
 wrote:

 Hello,

 I have enabled the Spellcheck component in Solr, which gives me spelling
 suggestions. However, I would like those suggestions to be applied in the
 same select request handler to retrieve additional results based on the
 suggestions. How can this be achieved with Solr?

 Regards,
 Ashish



Re: SpellCheck component query

2015-03-08 Thread Ashish Mukherjee
Hi Aman,

Thanks for your response.

Taking your example further to elaborate what I am looking to do -

if user types 'chai' and suggestion is 'chat' , then I would like to see
all the values which 'chat' in them as suggestions, such as 'text chat',
'video chat', 'audio chat' etc. without making another search request for
'chat'.

Can this be accomplished?

Regards,
Ashish

On Mon, Mar 9, 2015 at 2:50 AM, Aman Tandon amantandon...@gmail.com wrote:

 Hi,

 AFAIK solr currently not providing this feature.

 Suppose a scenario, the user is trying to search for chai (hindi meaning
 of tea). And in your index you have more documents containing the keyword
 chat as compared to the the keyword chai.

 chat = 501
 chai = 29

 and the maxQueryFrequency is 25.

 So solr will suggest you chat as this term is present in more documents and
 if you want from solr to search internally for the suggestion then you will
 be displaying he results of chat to the user when the user intended to
 search for chai.

 So I suppose it is good to show wrong suggestion instead of providing the
 inappropriate results to the user.

 In this case you could the show the chat and chai as suggestion to the user
 and then he could select the appropriate suggestion.

 With Regards
 Aman Tandon

 On Sat, Mar 7, 2015 at 7:57 PM, Ashish Mukherjee 
 ashish.mukher...@gmail.com
  wrote:

  Hello,
 
  I have enabled the Spellcheck component in Solr, which gives me spelling
  suggestions. However, I would like those suggestions to be applied in the
  same select request handler to retrieve additional results based on the
  suggestions. How can this be achieved with Solr?
 
  Regards,
  Ashish
 



Re: SpellCheck (AutoComplete) Not Working In Distributed Environment

2015-01-13 Thread Charles Sanders
Still not able to get my autoComplete component to work in a distributed 
environment. Works fine on a non-distributed system. Also, on the distributed 
system, if I include distrib=false, it works. 

I have tried shards.qt and shards parameters, but they make no difference. I 
should add, I am running SolrCloud and ZooKeeper, if that makes any difference. 
I have played around with this quite a bit, but nothing seems to work. 

When I add shards.qt=/ac {the name of the request handler}, I get an error in 
the solr logs. It simply states: java.lang.NullPointerException. That's it 
nothing more. This is listed as logger SolrCore and SolrDispatchFilter. 

Any ideas, suggestions on how I can troubleshoot and find the problem? Is there 
something specific I should look for? 

Please find attached text file with relevant information from schema.xml and 
sorlconfig.xml. 

Any help greatly appreciated! Thanks, 
-Charles 



- Original Message -

From: Erick Erickson erickerick...@gmail.com 
To: solr-user@lucene.apache.org 
Sent: Tuesday, December 30, 2014 6:07:13 PM 
Subject: Re: SpellCheck (AutoComplete) Not Working In Distributed Environment 

Did you try the shards parameter? See: 
https://cwiki.apache.org/confluence/display/solr/Spell+Checking#SpellChecking-DistributedSpellCheck
 

On Tue, Dec 30, 2014 at 2:20 PM, Charles Sanders csand...@redhat.com wrote: 
 I'm running Solr 4.8 in a distributed environment (2 shards). I have added 
 the spellcheck component to my request handler. In my test system, which is 
 not distributed, it works. But when I move it to the Dev box, which is 
 distributed, 2 shards, it is not working. Is there something additional I 
 must do to get this to work in a distributed environment? 
 
 requestHandler default=true name=standard class=solr.SearchHandler 
 !-- default values for query parameters can be specified, these 
 will be overridden by parameters in the request 
 -- 
 lst name=defaults 
 str name=echoParamsexplicit/str 
 int name=rows10/int 
 str name=dfallText/str 
 !-- default autocomplete settings for this search request handler -- 
 str name=spellchecktrue/str 
 str name=spellcheck.dictionaryandreasAutoComplete/str 
 str name=spellcheck.onlyMorePopulartrue/str 
 str name=spellcheck.count5/str 
 str name=spellcheck.collatetrue/str 
 str name=spellcheck.maxCollations5/str 
 /lst 
 arr name=last-components 
 strautoComplete/str 
 /arr 
 /requestHandler 
 
 searchComponent name=autoComplete class=solr.SpellCheckComponent 
 lst name=spellchecker 
 str name=nameandreasAutoComplete/str 
 str name=classnameorg.apache.solr.spelling.suggest.Suggester/str 
 str 
 name=lookupImplorg.apache.solr.spelling.suggest.tst.TSTLookupFactory/str 
 str name=fieldsugg_allText/str 
 str name=buildOnCommittrue/str 
 float name=threshold.005/float 
 str name=queryAnalyzerFieldTypetext_suggest/str 
 /lst 
 /searchComponent 
 
 
 Any help greatly appreciated! Thanks, 
 -Charles 
 
 
 

* Schema.xml ***
field name=issue_suggest type=text_suggest indexed=true stored=false/
field name=sugg_allText type=text_suggest indexed=true 
multiValued=true stored=false/

fieldType name=text_suggest class=solr.TextField 
positionIncrementGap=100
  analyzer type=index
tokenizer class=solr.StandardTokenizerFactory/
filter class=solr.LowerCaseFilterFactory/
  /analyzer
  analyzer type=query
tokenizer class=solr.StandardTokenizerFactory/
filter class=solr.LowerCaseFilterFactory/
  /analyzer
/fieldType


 Solrconfig.xml ***

!-- Auto-Complete component --
searchComponent name=autoComplete class=solr.SpellCheckComponent
lst name=spellchecker
str name=nameandreasAutoComplete/str
str 
name=classnameorg.apache.solr.spelling.suggest.Suggester/str
str 
name=lookupImplorg.apache.solr.spelling.suggest.tst.TSTLookupFactory/str   
   
str name=fieldsugg_allText/str
str name=buildOnCommittrue/str
float name=threshold.005/float
str name=queryAnalyzerFieldTypetext_suggest/str
/lst
lst name=spellchecker
str name=namerecommendationsAutoComplete/str
str 
name=classnameorg.apache.solr.spelling.suggest.Suggester/str
str 
name=lookupImplorg.apache.solr.spelling.suggest.tst.TSTLookupFactory/str   
   
str name=fieldissue_suggest/str
str name=buildOnCommittrue/str
float name=threshold.005/float
str name=queryAnalyzerFieldTypetext_suggest/str
/lst
/searchComponent

requestHandler name=/ac class=solr.SearchHandler
lst name=defaults
str name=spellchecktrue/str

Re: SpellCheck (AutoComplete) Not Working In Distributed Environment

2015-01-02 Thread Shawn Heisey
On 1/1/2015 1:09 PM, Meraj A. Khan wrote:
 When running SolrCloud do you even have to include the shards parameter
 ,shouldnt only shards.qt parameter suffice?

If you are using SolrCloud, no shards parameter is required ... all
queries sent to either the collection or any shard replica will
automatically use all shards.  You *can* use the shards parameter if you
only want to query a subset of your shards, or distrib=false if you want
to only query the specific shard replica where you sent the request.

If it's not SolrCloud, there is no distributed search without the shards
parameter.

If you're using the /select handler, then shards.qt is not necessary at
all.  I do not know what SolrCloud does with handlers on distributed
requests, whether it uses the same handler name for those requests, or
uses /select by default like non-cloud does.

Thanks,
Shawn



Re: SpellCheck (AutoComplete) Not Working In Distributed Environment

2015-01-01 Thread Meraj A. Khan
Shawn,

When running SolrCloud do you even have to include the shards parameter
,shouldnt only shards.qt parameter suffice?
On Dec 30, 2014 7:17 PM, Shawn Heisey apa...@elyograg.org wrote:

 On 12/30/2014 5:03 PM, Charles Sanders wrote:
  Thanks for the suggestion.
 
  I did not do that originally because the documentation states:
  This parameter is not required for the /select request handler.
 
  Which is what I am using. But I gave it a go, even though I'm not
 certain of the shard names. Now I have a NPE.
 
 
 solr/collection1/select?q=kernel+prows=1wt=jsonindent=trueshards.qt=/acshards=shard1,shard2

 If this is not SolrCloud, then the shards parameter must include most of
 the full base URL for each shard that you will be querying.  You can
 only use a bare shard name if you're running SolrCloud.

 The shards.qt parameter that you have used means that when the shards
 are consulted, the /ac handler will be used rather than /select.

 Here's an example of a shards parameter that will combine results from
 three cores on two machines.  When not running SolrCloud, this is how
 you do distributed searching:

 shards=
 idxa2.example.com:8981/solr/ai-inclive,idxa1.example.com:8981/solr/ai-0live,idxa2.example.com:8981/solr/ai-1live

 SolrCloud hides almost all of this complexity.

 Thanks,
 Shawn




Re: SpellCheck (AutoComplete) Not Working In Distributed Environment

2014-12-31 Thread Charles Sanders
Got it. Thanks for your help everyone. 


- Original Message -

From: Shawn Heisey apa...@elyograg.org 
To: solr-user@lucene.apache.org 
Sent: Tuesday, December 30, 2014 7:16:59 PM 
Subject: Re: SpellCheck (AutoComplete) Not Working In Distributed Environment 

On 12/30/2014 5:03 PM, Charles Sanders wrote: 
 Thanks for the suggestion. 
 
 I did not do that originally because the documentation states: 
 This parameter is not required for the /select request handler. 
 
 Which is what I am using. But I gave it a go, even though I'm not certain of 
 the shard names. Now I have a NPE. 
 
 solr/collection1/select?q=kernel+prows=1wt=jsonindent=trueshards.qt=/acshards=shard1,shard2
  

If this is not SolrCloud, then the shards parameter must include most of 
the full base URL for each shard that you will be querying. You can 
only use a bare shard name if you're running SolrCloud. 

The shards.qt parameter that you have used means that when the shards 
are consulted, the /ac handler will be used rather than /select. 

Here's an example of a shards parameter that will combine results from 
three cores on two machines. When not running SolrCloud, this is how 
you do distributed searching: 

shards=idxa2.example.com:8981/solr/ai-inclive,idxa1.example.com:8981/solr/ai-0live,idxa2.example.com:8981/solr/ai-1live
 

SolrCloud hides almost all of this complexity. 

Thanks, 
Shawn 




Re: SpellCheck (AutoComplete) Not Working In Distributed Environment

2014-12-30 Thread Erick Erickson
Did you try the shards parameter? See:
https://cwiki.apache.org/confluence/display/solr/Spell+Checking#SpellChecking-DistributedSpellCheck

On Tue, Dec 30, 2014 at 2:20 PM, Charles Sanders csand...@redhat.com wrote:
 I'm running Solr 4.8 in a distributed environment (2 shards). I have added 
 the spellcheck component to my request handler. In my test system, which is 
 not distributed, it works. But when I move it to the Dev box, which is 
 distributed, 2 shards, it is not working. Is there something additional I 
 must do to get this to work in a distributed environment?

 requestHandler default=true name=standard class=solr.SearchHandler
 !-- default values for query parameters can be specified, these
 will be overridden by parameters in the request
 --
 lst name=defaults
 str name=echoParamsexplicit/str
 int name=rows10/int
 str name=dfallText/str
 !-- default autocomplete settings for this search request handler --
 str name=spellchecktrue/str
 str name=spellcheck.dictionaryandreasAutoComplete/str
 str name=spellcheck.onlyMorePopulartrue/str
 str name=spellcheck.count5/str
 str name=spellcheck.collatetrue/str
 str name=spellcheck.maxCollations5/str
 /lst
 arr name=last-components
 strautoComplete/str
 /arr
 /requestHandler

 searchComponent name=autoComplete class=solr.SpellCheckComponent
 lst name=spellchecker
 str name=nameandreasAutoComplete/str
 str name=classnameorg.apache.solr.spelling.suggest.Suggester/str
 str 
 name=lookupImplorg.apache.solr.spelling.suggest.tst.TSTLookupFactory/str
 str name=fieldsugg_allText/str
 str name=buildOnCommittrue/str
 float name=threshold.005/float
 str name=queryAnalyzerFieldTypetext_suggest/str
 /lst
 /searchComponent


 Any help greatly appreciated! Thanks,
 -Charles





Re: SpellCheck (AutoComplete) Not Working In Distributed Environment

2014-12-30 Thread Charles Sanders
Thanks for the suggestion. 

I did not do that originally because the documentation states: 
This parameter is not required for the /select request handler. 

Which is what I am using. But I gave it a go, even though I'm not certain of 
the shard names. Now I have a NPE. 

solr/collection1/select?q=kernel+prows=1wt=jsonindent=trueshards.qt=/acshards=shard1,shard2
 

{
  responseHeader:{
status:500,
QTime:12,
params:{
  shards:shard1,shard2,
  indent:true,
  shards.qt:/ac,
  q:kernel p,
  wt:json,
  rows:1}},
  error:{
trace:java.lang.NullPointerException\n\tat 
org.apache.solr.handler.component.QueryComponent.mergeIds(QueryComponent.java:901)\n\tat
 
org.apache.solr.handler.component.QueryComponent.handleRegularResponses(QueryComponent.java:686)\n\tat
 
org.apache.solr.handler.component.QueryComponent.handleResponses(QueryComponent.java:665)\n\tat
 
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:325)\n\tat
 
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)\n\tat
 org.apache.solr.core.SolrCore.execute(SolrCore.java:1952)\n\tat 
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:787)\n\tat
 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:431)\n\tat
 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)\n\tat
 
com.lucid.servlet.LweSolrDispatchFilter.doFilter(LweSolrDispatchFilter.java:202)\n\tat
 
com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)\n\tat
 
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)\n\tat
 
com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)\n\tat
 
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)\n\tat
 
com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)\n\tat
 com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)\n\tat 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1337)\n\tat
 
org.eclipse.jetty.servlets.CrossOriginFilter.handle(CrossOriginFilter.java:212)\n\tat
 
org.eclipse.jetty.servlets.CrossOriginFilter.doFilter(CrossOriginFilter.java:179)\n\tat
 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1337)\n\tat
 
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:484)\n\tat
 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)\n\tat
 
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)\n\tat
 
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:233)\n\tat
 
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)\n\tat
 
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)\n\tat 
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)\n\tat
 
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)\n\tat
 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)\n\tat
 
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)\n\tat
 
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)\n\tat
 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)\n\tat
 org.eclipse.jetty.server.Server.handle(Server.java:351)\n\tat 
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)\n\tat
 
org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:47)\n\tat
 
org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:890)\n\tat
 
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:944)\n\tat
 org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:634)\n\tat 
org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)\n\tat 
org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:66)\n\tat
 
org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:254)\n\tat
 
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)\n\tat
 
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)\n\tat
 java.lang.Thread.run(Thread.java:744)\n,
code:500}} 



- Original Message -

From: Erick Erickson erickerick...@gmail.com 
To: solr-user@lucene.apache.org 
Sent: Tuesday, December 30, 2014 6:07:13 PM 
Subject: Re: SpellCheck (AutoComplete) Not Working In Distributed Environment 

Did you try the shards parameter? See: 
https://cwiki.apache.org/confluence/display/solr/Spell+Checking#SpellChecking-DistributedSpellCheck
 

On Tue, Dec 30, 2014 at 2:20 PM, Charles Sanders csand

Re: SpellCheck (AutoComplete) Not Working In Distributed Environment

2014-12-30 Thread Shawn Heisey
On 12/30/2014 5:03 PM, Charles Sanders wrote:
 Thanks for the suggestion. 
 
 I did not do that originally because the documentation states: 
 This parameter is not required for the /select request handler. 
 
 Which is what I am using. But I gave it a go, even though I'm not certain of 
 the shard names. Now I have a NPE. 
 
 solr/collection1/select?q=kernel+prows=1wt=jsonindent=trueshards.qt=/acshards=shard1,shard2
  

If this is not SolrCloud, then the shards parameter must include most of
the full base URL for each shard that you will be querying.  You can
only use a bare shard name if you're running SolrCloud.

The shards.qt parameter that you have used means that when the shards
are consulted, the /ac handler will be used rather than /select.

Here's an example of a shards parameter that will combine results from
three cores on two machines.  When not running SolrCloud, this is how
you do distributed searching:

shards=idxa2.example.com:8981/solr/ai-inclive,idxa1.example.com:8981/solr/ai-0live,idxa2.example.com:8981/solr/ai-1live

SolrCloud hides almost all of this complexity.

Thanks,
Shawn



RE: spellcheck if docsfound below threshold

2014-05-16 Thread Dyer, James
Its spellcheck.maxResultsForSuggest.

http://wiki.apache.org/solr/SpellCheckComponent#spellcheck.maxResultsForSuggest

James Dyer
Ingram Content Group
(615) 213-4311

-Original Message-
From: Jan Verweij - Reeleez [mailto:j...@reeleez.nl] 
Sent: Monday, May 12, 2014 2:12 AM
To: solr-user@lucene.apache.org
Subject: spellcheck if docsfound below threshold

Hi,

Is there a setting to only include spellcheck if the number of documents
found is below a certain threshold?

Or would we need to rerun the request with the spellcheck parameters based
on the docs found?

Kind regards,

Jan Verweij


Re: [Spellcheck] NullPointerException on QueryComponent.mergeIds

2013-12-07 Thread Jean-Marc Desprez
James,
Sorry for the late response.
The shard.qt parameter actually solved my problem !

Thanks
Jean-Marc


2013/11/12 Dyer, James james.d...@ingramcontent.com

 Jean-Marc,

 This might not solve the particular problem you're having, but to get
 spellcheck to work properly in a distributed enviornment, be sure to set
 the shards.qt parameter to the name of your request handler.  See
 http://wiki.apache.org/solr/SpellCheckComponent#Distributed_Search_Support.

 James Dyer
 Ingram Content Group
 (615) 213-4311


 -Original Message-
 From: Jean-Marc Desprez [mailto:jm.desp...@gmail.com]
 Sent: Tuesday, November 12, 2013 8:57 AM
 To: solr-user@lucene.apache.org
 Subject: [Spellcheck] NullPointerException on QueryComponent.mergeIds

 Hello,

 I'm following this tutorial : http://wiki.apache.org/solr/SolrCloud with a
 SolR 4.5.0

 I'm at the very first step, only two replica and two shard and I have only
 *one* document in the index.

 When I try to get a spellcheck, I have this error :
 java.lang.NullPointerException
 at

 org.apache.solr.handler.component.QueryComponent.mergeIds(QueryComponent.java:843)

 I do not understand what I'm doing wrong and how I can get an error on
 mergeIds with only one document in the index (merge this doc with ... ??)

 Some technical details :
 URL :

 http://127.0.0.1:8983/solr/bench/select?shards.qt=ri_spell_fr_FRq=sistemdistrib=true
 If I set distrib to false, no error.

 My uniqueKey is indexed and stored :

 field name=ref type=string indexed=true stored=true
 multiValued=false /
 uniqueKeyref/uniqueKey


 My conf :
 requestHandler name=ri_spell_fr_FR class=solr.SearchHandler
 lazy=true
   lst name=defaults
 bool name=spellchecktrue/bool
 str  name=spellcheck.onlyMorePopulartrue/str
 str  name=spellcheck.extendedResultstrue/str
 str  name=spellcheck.collateExtendedResultstrue/str
 str  name=spellcheck.maxCollationTries3/str
 str  name=spellcheck.collatetrue/str
 str  name=spellcheck.count5/str
 str  name=spellcheck.dictionaryri_spell_fr_FR/str
 str  name=spellcheck.buildfalse/str
   /lst

   arr name=components
 strspellcheck_fr_FR/str
   /arr
 /requestHandler

 searchComponent name=spellcheck_fr_FR class=solr.SpellCheckComponent
   str name=queryAnalyzerFieldTypesuggest_fr_FR/str

   lst name=spellchecker
 str name=nameri_spell_fr_FR/str
 str name=fieldspell_fr_FR/str
 str name=spellcheckIndexDir./spellchecker_fr_FR/str
 str

 name=distanceMeasureorg.apache.lucene.search.spell.JaroWinklerDistance/str
   /lst

   ...

 /searchComponent

 With this URL :
 http://127.0.0.1:8983/solr/bench/select?qt=ri_spell_fr_FRq=sistem

 I have no error but the response is empty :
 responselst name=responseHeaderint name=status0/intint
 name=QTime1/int/lst/response


 Thanks
 Jean-Marc



RE: [Spellcheck] NullPointerException on QueryComponent.mergeIds

2013-11-12 Thread Dyer, James
Jean-Marc,

This might not solve the particular problem you're having, but to get 
spellcheck to work properly in a distributed enviornment, be sure to set the 
shards.qt parameter to the name of your request handler.  See 
http://wiki.apache.org/solr/SpellCheckComponent#Distributed_Search_Support .

James Dyer
Ingram Content Group
(615) 213-4311


-Original Message-
From: Jean-Marc Desprez [mailto:jm.desp...@gmail.com] 
Sent: Tuesday, November 12, 2013 8:57 AM
To: solr-user@lucene.apache.org
Subject: [Spellcheck] NullPointerException on QueryComponent.mergeIds

Hello,

I'm following this tutorial : http://wiki.apache.org/solr/SolrCloud with a
SolR 4.5.0

I'm at the very first step, only two replica and two shard and I have only
*one* document in the index.

When I try to get a spellcheck, I have this error :
java.lang.NullPointerException
at
org.apache.solr.handler.component.QueryComponent.mergeIds(QueryComponent.java:843)

I do not understand what I'm doing wrong and how I can get an error on
mergeIds with only one document in the index (merge this doc with ... ??)

Some technical details :
URL :
http://127.0.0.1:8983/solr/bench/select?shards.qt=ri_spell_fr_FRq=sistemdistrib=true
If I set distrib to false, no error.

My uniqueKey is indexed and stored :

field name=ref type=string indexed=true stored=true
multiValued=false /
uniqueKeyref/uniqueKey


My conf :
requestHandler name=ri_spell_fr_FR class=solr.SearchHandler
lazy=true
  lst name=defaults
bool name=spellchecktrue/bool
str  name=spellcheck.onlyMorePopulartrue/str
str  name=spellcheck.extendedResultstrue/str
str  name=spellcheck.collateExtendedResultstrue/str
str  name=spellcheck.maxCollationTries3/str
str  name=spellcheck.collatetrue/str
str  name=spellcheck.count5/str
str  name=spellcheck.dictionaryri_spell_fr_FR/str
str  name=spellcheck.buildfalse/str
  /lst

  arr name=components
strspellcheck_fr_FR/str
  /arr
/requestHandler

searchComponent name=spellcheck_fr_FR class=solr.SpellCheckComponent
  str name=queryAnalyzerFieldTypesuggest_fr_FR/str

  lst name=spellchecker
str name=nameri_spell_fr_FR/str
str name=fieldspell_fr_FR/str
str name=spellcheckIndexDir./spellchecker_fr_FR/str
str
name=distanceMeasureorg.apache.lucene.search.spell.JaroWinklerDistance/str
  /lst

  ...

/searchComponent

With this URL :
http://127.0.0.1:8983/solr/bench/select?qt=ri_spell_fr_FRq=sistem

I have no error but the response is empty :
responselst name=responseHeaderint name=status0/intint
name=QTime1/int/lst/response


Thanks
Jean-Marc


RE: spellcheck solr 4.3.1

2013-11-11 Thread Dyer, James
There are 2 parameters you want to consider:

First is spellcheck.maxResultsForSuggest.  Because you have an OR query, 
you'll get hits if only 1 query term is in the index.  This parameter lets you 
tune it to make it suggest if the query returns n or fewer hits.  My memory 
tells me, however, that if you leave this parameter out entirely, it will still 
return suggestions for OR queries with some misspelled words (false memory on 
my part?).  Possibly you have this set to 1?  Omitting it might be a better 
option.  See 
http://wiki.apache.org/solr/SpellCheckComponent#spellcheck.maxResultsForSuggest 
.

Second is collateParam, which lets you override certain query parameters when 
the spellchecker is testing collations against the index.  For instance, if you 
have q.op=OR, the spellchecker will return collations that possibly only have 
1 correct term.  The reason is it simply checks if a collation will return any 
hits.  So you can overide this with spellcheck.collateParam.q.op=AND.  The 
same can be done for mm if using edismax.  See 
http://wiki.apache.org/solr/SpellCheckComponent#spellcheck.collateParam.XX .

James Dyer
Ingram Content Group
(615) 213-4311

-Original Message-
From: Daniel Borup [mailto:d...@alpha-solutions.dk] 
Sent: Monday, November 11, 2013 7:38 AM
To: solr-user@lucene.apache.org
Subject: spellcheck solr 4.3.1

Hey

I am running af solr 4.3.1 and working is implementing spellcheck using 
solr.DirectSolrSpellChecker everything seems to be working  fine but at have 
one issue.

If I search for
http://localhost:8765/solr/MainIndex/spell?q=kim%20AND%20larsen

the result is some hits and the spell component return the following structure.

lst name=spellcheck
lst name=suggestions
bool name=correctlySpelledtrue/bool
/lst
/lst
I would have liked that if some suggest were found they were return

If I do a search for
http://localhost:8765/solr/MainIndex/spell?q=kim%20AND%20larsenn

with larsen spelled wrong (larsenn) the spell component return the following:

lst name=spellcheck
lst name=suggestions
lst name=larsenn
int name=numFound1/int
int name=startOffset8/int
int name=endOffset15/int
int name=origFreq0/int
arr name=suggestion
lst
str name=wordlarsen/str
int name=freq12/int
/lst
/arr
/lst
bool name=correctlySpelledfalse/bool
lst name=collation
str name=collationQuerykim AND larsen/str
int name=hits12/int
lst name=misspellingsAndCorrections
str name=kimkim/str
str name=larsennlarsen/str
/lst
/lst
/lst
/lst

In my point of view this is correct but, if I do the same search as above just 
as an OR search http://localhost:8765/solr/MainIndex/spell?q=kim%20OR%20larsenn
The spell component return some result and:

lst name=spellcheck
lst name=suggestions
bool name=correctlySpelledtrue/bool
/lst
/lst

larsenn now is spelled corrected according to solr, I cannot understand this 
behavior. Is there a setting to adjust the spell component so it always return 
suggestions ? or a way to have suggest in OR search with one wrong word working?






Med venlig hilsen / Best regards

Daniel Borup
Tel: (+45) 28 87 69 18
E-mail: d...@alpha-solutions.dkmailto:d...@alpha-solutions.dk

Alpha Solutions A/S
Sølvgade 10, 1.sal, DK-1307 Copenhagen K
Tel: (+45) 70 20 65 38
Web: www.alpha-solutions.dkhttp://www.alpha-solutions.dk/


** This message including any attachments may contain confidential and/or 
privileged information
intended only for the person or entity to which it is addressed. If you are not 
the intended recipient
you should delete this message. Any printing, copying, distribution or other 
use of this message is strictly prohibited.
If you have received this message in error, please notify the sender 
immediately by telephone
or e-mail and delete all copies of this message and any attachments from your 
system. Thank you.



Re: Spellcheck with Distributed Search (sharding).

2013-10-24 Thread Luis Cappa Banda
Any idea?


2013/10/23 Luis Cappa Banda luisca...@gmail.com

 More info:

 When executing the Query to a single Solr server it works:
 http://solr1:8080/events/data/suggest?q=mwt=jsonhttp://solrclusterd.buguroo.dev:8080/events/data/suggest?q=mwt=json

 {

- responseHeader:
{
   - status: 0,
   - QTime: 1
   },
- response:
{
   - numFound: 0,
   - start: 0,
   - docs: [ ]
   },
- spellcheck:
{
   - suggestions:
   [
  - m,
  -
  {
 - numFound: 4,
 - startOffset: 0,
 - endOffset: 1,
 - suggestion:
 [
- marca,
- marcacom,
- mis,
- mispelotas
]
 }
  ]
   }

 }


 But when choosing the Request handler this way it doesn't:
 http://solr1:8080/events/data/select?*qt=/sugges*twt=jsonq=*:*http://solrclusterd.buguroo.dev:8080/events/data/select?qt=/suggestwt=jsonq=*:*




 2013/10/23 Luis Cappa Banda luisca...@gmail.com

 Hello!

 I'be been trying to enable Spellchecking using sharding following the
 steps from the Wiki, but I failed, :-( What I do is:

 *Solrconfig.xml*


 *searchComponent name=suggest* class=solr.SpellCheckComponent
 lst name=spellchecker
  str name=namesuggest/str
 str name=classnameorg.apache.solr.spelling.suggest.Suggester/str
  str
 name=lookupImplorg.apache.solr.spelling.suggest.tst.TSTLookup/str
 str name=fieldsuggestion/str
  str name=buildOnOptimizetrue/str
 /lst
 /searchComponent


 *requestHandler name=/suggest* class=solr.SearchHandler
 lst name=defaults
  str name=dfsuggestion/str
 str name=spellchecktrue/str
  str name=spellcheck.dictionarysuggest/str
 str name=spellcheck.count10/str
  /lst
   arr name=last-components
 strsuggest/str
   /arr
 /requestHandler


 *Note:* I have two shards (solr1 and solr2) and both have the same
 solrconfig.xml. Also, bot indexes were optimized to create the spellchecker
 indexes.

 *Query*


 solr1:8080/events/data/select?q=mqt=/suggestionshards.qt=/suggestionwt=jsonshards=solr1:8080/events/data,solr2:8080/events/data

 *
 *
 *Response*
 *
 *
 {

- responseHeader:
{
   - status: 404,
   - QTime: 12,
   - params:
   {
  - shards: solr1:8080/events/data,solr2:8080/events/data,
  - shards.qt: /suggestion,
  - q: m,
  - wt: json,
  - qt: /suggestion
  }
   },
- error:
{
   - msg: Server at http://solr1:8080/events/data returned non ok
   status:404, message:Not Found,
   - code: 404
   }

 }

 More query syntaxes that I used and that doesn't work:


 http://solr1:8080/events/data/select?q=mqt=suggestionshards.qt=/suggestionwt=jsonshards=solr1:8080/events/data,solr2:8080/events/datahttp://solrclusterd.buguroo.dev:8080/events/data/select?q=mqt=suggestionshards.qt=/suggestionwt=jsonshards=solrclusterd.buguroo.dev:8080/events/data,solrclusterc.buguroo.dev:8080/events/data


 http://solr1:8080/events/data/select?q=*:*spellcheck.q=mqt=suggestionshards.qt=/suggestionwt=jsonshards=solr1:8080/events/data,solr2:8080/events/datahttp://solrclusterd.buguroo.dev:8080/events/data/select?q=*:*spellcheck.q=mqt=suggestionshards.qt=/suggestionwt=jsonshards=solrclusterd.buguroo.dev:8080/events/data,solrclusterc.buguroo.dev:8080/events/data


 Any idea of what I'm doing wrong?

 Thank you very much in advance!

 Best regards,

 --
 - Luis Cappa




 --
 - Luis Cappa




-- 
- Luis Cappa


RE: Spellcheck with Distributed Search (sharding).

2013-10-24 Thread Dyer, James
Is it that your request handler is named /suggest but you are setting 
shards.qt to /suggestion ?

James Dyer
Ingram Content Group
(615) 213-4311


-Original Message-
From: Luis Cappa Banda [mailto:luisca...@gmail.com] 
Sent: Thursday, October 24, 2013 6:22 AM
To: solr-user@lucene.apache.org
Subject: Re: Spellcheck with Distributed Search (sharding).

Any idea?


2013/10/23 Luis Cappa Banda luisca...@gmail.com

 More info:

 When executing the Query to a single Solr server it works:
 http://solr1:8080/events/data/suggest?q=mwt=jsonhttp://solrclusterd.buguroo.dev:8080/events/data/suggest?q=mwt=json

 {

- responseHeader:
{
   - status: 0,
   - QTime: 1
   },
- response:
{
   - numFound: 0,
   - start: 0,
   - docs: [ ]
   },
- spellcheck:
{
   - suggestions:
   [
  - m,
  -
  {
 - numFound: 4,
 - startOffset: 0,
 - endOffset: 1,
 - suggestion:
 [
- marca,
- marcacom,
- mis,
- mispelotas
]
 }
  ]
   }

 }


 But when choosing the Request handler this way it doesn't:
 http://solr1:8080/events/data/select?*qt=/sugges*twt=jsonq=*:*http://solrclusterd.buguroo.dev:8080/events/data/select?qt=/suggestwt=jsonq=*:*




 2013/10/23 Luis Cappa Banda luisca...@gmail.com

 Hello!

 I'be been trying to enable Spellchecking using sharding following the
 steps from the Wiki, but I failed, :-( What I do is:

 *Solrconfig.xml*


 *searchComponent name=suggest* class=solr.SpellCheckComponent
 lst name=spellchecker
  str name=namesuggest/str
 str name=classnameorg.apache.solr.spelling.suggest.Suggester/str
  str
 name=lookupImplorg.apache.solr.spelling.suggest.tst.TSTLookup/str
 str name=fieldsuggestion/str
  str name=buildOnOptimizetrue/str
 /lst
 /searchComponent


 *requestHandler name=/suggest* class=solr.SearchHandler
 lst name=defaults
  str name=dfsuggestion/str
 str name=spellchecktrue/str
  str name=spellcheck.dictionarysuggest/str
 str name=spellcheck.count10/str
  /lst
   arr name=last-components
 strsuggest/str
   /arr
 /requestHandler


 *Note:* I have two shards (solr1 and solr2) and both have the same
 solrconfig.xml. Also, bot indexes were optimized to create the spellchecker
 indexes.

 *Query*


 solr1:8080/events/data/select?q=mqt=/suggestionshards.qt=/suggestionwt=jsonshards=solr1:8080/events/data,solr2:8080/events/data

 *
 *
 *Response*
 *
 *
 {

- responseHeader:
{
   - status: 404,
   - QTime: 12,
   - params:
   {
  - shards: solr1:8080/events/data,solr2:8080/events/data,
  - shards.qt: /suggestion,
  - q: m,
  - wt: json,
  - qt: /suggestion
  }
   },
- error:
{
   - msg: Server at http://solr1:8080/events/data returned non ok
   status:404, message:Not Found,
   - code: 404
   }

 }

 More query syntaxes that I used and that doesn't work:


 http://solr1:8080/events/data/select?q=mqt=suggestionshards.qt=/suggestionwt=jsonshards=solr1:8080/events/data,solr2:8080/events/datahttp://solrclusterd.buguroo.dev:8080/events/data/select?q=mqt=suggestionshards.qt=/suggestionwt=jsonshards=solrclusterd.buguroo.dev:8080/events/data,solrclusterc.buguroo.dev:8080/events/data


 http://solr1:8080/events/data/select?q=*:*spellcheck.q=mqt=suggestionshards.qt=/suggestionwt=jsonshards=solr1:8080/events/data,solr2:8080/events/datahttp://solrclusterd.buguroo.dev:8080/events/data/select?q=*:*spellcheck.q=mqt=suggestionshards.qt=/suggestionwt=jsonshards=solrclusterd.buguroo.dev:8080/events/data,solrclusterc.buguroo.dev:8080/events/data


 Any idea of what I'm doing wrong?

 Thank you very much in advance!

 Best regards,

 --
 - Luis Cappa




 --
 - Luis Cappa




-- 
- Luis Cappa



Re: Spellcheck with Distributed Search (sharding).

2013-10-24 Thread Luis Cappa Banda
I'ts just a type error, sorry about that! The Request Handler is OK spelled
and it doesn't work.


2013/10/24 Dyer, James james.d...@ingramcontent.com

 Is it that your request handler is named /suggest but you are setting
 shards.qt to /suggestion ?

 James Dyer
 Ingram Content Group
 (615) 213-4311


 -Original Message-
 From: Luis Cappa Banda [mailto:luisca...@gmail.com]
 Sent: Thursday, October 24, 2013 6:22 AM
 To: solr-user@lucene.apache.org
 Subject: Re: Spellcheck with Distributed Search (sharding).

 Any idea?


 2013/10/23 Luis Cappa Banda luisca...@gmail.com

  More info:
 
  When executing the Query to a single Solr server it works:
  http://solr1:8080/events/data/suggest?q=mwt=json
 http://solrclusterd.buguroo.dev:8080/events/data/suggest?q=mwt=json
 
  {
 
 - responseHeader:
 {
- status: 0,
- QTime: 1
},
 - response:
 {
- numFound: 0,
- start: 0,
- docs: [ ]
},
 - spellcheck:
 {
- suggestions:
[
   - m,
   -
   {
  - numFound: 4,
  - startOffset: 0,
  - endOffset: 1,
  - suggestion:
  [
 - marca,
 - marcacom,
 - mis,
 - mispelotas
 ]
  }
   ]
}
 
  }
 
 
  But when choosing the Request handler this way it doesn't:
  http://solr1:8080/events/data/select?*qt=/sugges*twt=jsonq=*:*
 http://solrclusterd.buguroo.dev:8080/events/data/select?qt=/suggestwt=jsonq=*:*
 
 
 
 
 
  2013/10/23 Luis Cappa Banda luisca...@gmail.com
 
  Hello!
 
  I'be been trying to enable Spellchecking using sharding following the
  steps from the Wiki, but I failed, :-( What I do is:
 
  *Solrconfig.xml*
 
 
  *searchComponent name=suggest* class=solr.SpellCheckComponent
  lst name=spellchecker
   str name=namesuggest/str
  str name=classnameorg.apache.solr.spelling.suggest.Suggester/str
   str
  name=lookupImplorg.apache.solr.spelling.suggest.tst.TSTLookup/str
  str name=fieldsuggestion/str
   str name=buildOnOptimizetrue/str
  /lst
  /searchComponent
 
 
  *requestHandler name=/suggest* class=solr.SearchHandler
  lst name=defaults
   str name=dfsuggestion/str
  str name=spellchecktrue/str
   str name=spellcheck.dictionarysuggest/str
  str name=spellcheck.count10/str
   /lst
arr name=last-components
  strsuggest/str
/arr
  /requestHandler
 
 
  *Note:* I have two shards (solr1 and solr2) and both have the same
  solrconfig.xml. Also, bot indexes were optimized to create the
 spellchecker
  indexes.
 
  *Query*
 
 
 
 solr1:8080/events/data/select?q=mqt=/suggestionshards.qt=/suggestionwt=jsonshards=solr1:8080/events/data,solr2:8080/events/data
 
  *
  *
  *Response*
  *
  *
  {
 
 - responseHeader:
 {
- status: 404,
- QTime: 12,
- params:
{
   - shards: solr1:8080/events/data,solr2:8080/events/data,
   - shards.qt: /suggestion,
   - q: m,
   - wt: json,
   - qt: /suggestion
   }
},
 - error:
 {
- msg: Server at http://solr1:8080/events/data returned non ok
status:404, message:Not Found,
- code: 404
}
 
  }
 
  More query syntaxes that I used and that doesn't work:
 
 
 
 http://solr1:8080/events/data/select?q=mqt=suggestionshards.qt=/suggestionwt=jsonshards=solr1:8080/events/data,solr2:8080/events/data
 
 http://solrclusterd.buguroo.dev:8080/events/data/select?q=mqt=suggestionshards.qt=/suggestionwt=jsonshards=solrclusterd.buguroo.dev:8080/events/data,solrclusterc.buguroo.dev:8080/events/data
 
 
 
 
 http://solr1:8080/events/data/select?q=*:*spellcheck.q=mqt=suggestionshards.qt=/suggestionwt=jsonshards=solr1:8080/events/data,solr2:8080/events/data
 
 http://solrclusterd.buguroo.dev:8080/events/data/select?q=*:*spellcheck.q=mqt=suggestionshards.qt=/suggestionwt=jsonshards=solrclusterd.buguroo.dev:8080/events/data,solrclusterc.buguroo.dev:8080/events/data
 
 
 
  Any idea of what I'm doing wrong?
 
  Thank you very much in advance!
 
  Best regards,
 
  --
  - Luis Cappa
 
 
 
 
  --
  - Luis Cappa
 



 --
 - Luis Cappa




-- 
- Luis Cappa


Re: Spellcheck with Distributed Search (sharding).

2013-10-23 Thread Luis Cappa Banda
More info:

When executing the Query to a single Solr server it works:
http://solr1:8080/events/data/suggest?q=mwt=jsonhttp://solrclusterd.buguroo.dev:8080/events/data/suggest?q=mwt=json

{

   - responseHeader:
   {
  - status: 0,
  - QTime: 1
  },
   - response:
   {
  - numFound: 0,
  - start: 0,
  - docs: [ ]
  },
   - spellcheck:
   {
  - suggestions:
  [
 - m,
 -
 {
- numFound: 4,
- startOffset: 0,
- endOffset: 1,
- suggestion:
[
   - marca,
   - marcacom,
   - mis,
   - mispelotas
   ]
}
 ]
  }

}


But when choosing the Request handler this way it doesn't:
http://solr1:8080/events/data/select?*qt=/sugges*twt=jsonq=*:*http://solrclusterd.buguroo.dev:8080/events/data/select?qt=/suggestwt=jsonq=*:*




2013/10/23 Luis Cappa Banda luisca...@gmail.com

 Hello!

 I'be been trying to enable Spellchecking using sharding following the
 steps from the Wiki, but I failed, :-( What I do is:

 *Solrconfig.xml*


 *searchComponent name=suggest* class=solr.SpellCheckComponent
 lst name=spellchecker
  str name=namesuggest/str
 str name=classnameorg.apache.solr.spelling.suggest.Suggester/str
  str
 name=lookupImplorg.apache.solr.spelling.suggest.tst.TSTLookup/str
 str name=fieldsuggestion/str
  str name=buildOnOptimizetrue/str
 /lst
 /searchComponent


 *requestHandler name=/suggest* class=solr.SearchHandler
 lst name=defaults
  str name=dfsuggestion/str
 str name=spellchecktrue/str
  str name=spellcheck.dictionarysuggest/str
 str name=spellcheck.count10/str
  /lst
   arr name=last-components
 strsuggest/str
   /arr
 /requestHandler


 *Note:* I have two shards (solr1 and solr2) and both have the same
 solrconfig.xml. Also, bot indexes were optimized to create the spellchecker
 indexes.

 *Query*


 solr1:8080/events/data/select?q=mqt=/suggestionshards.qt=/suggestionwt=jsonshards=solr1:8080/events/data,solr2:8080/events/data

 *
 *
 *Response*
 *
 *
 {

- responseHeader:
{
   - status: 404,
   - QTime: 12,
   - params:
   {
  - shards: solr1:8080/events/data,solr2:8080/events/data,
  - shards.qt: /suggestion,
  - q: m,
  - wt: json,
  - qt: /suggestion
  }
   },
- error:
{
   - msg: Server at http://solr1:8080/events/data returned non ok
   status:404, message:Not Found,
   - code: 404
   }

 }

 More query syntaxes that I used and that doesn't work:


 http://solr1:8080/events/data/select?q=mqt=suggestionshards.qt=/suggestionwt=jsonshards=solr1:8080/events/data,solr2:8080/events/datahttp://solrclusterd.buguroo.dev:8080/events/data/select?q=mqt=suggestionshards.qt=/suggestionwt=jsonshards=solrclusterd.buguroo.dev:8080/events/data,solrclusterc.buguroo.dev:8080/events/data


 http://solr1:8080/events/data/select?q=*:*spellcheck.q=mqt=suggestionshards.qt=/suggestionwt=jsonshards=solr1:8080/events/data,solr2:8080/events/datahttp://solrclusterd.buguroo.dev:8080/events/data/select?q=*:*spellcheck.q=mqt=suggestionshards.qt=/suggestionwt=jsonshards=solrclusterd.buguroo.dev:8080/events/data,solrclusterc.buguroo.dev:8080/events/data


 Any idea of what I'm doing wrong?

 Thank you very much in advance!

 Best regards,

 --
 - Luis Cappa




-- 
- Luis Cappa


Re: spellcheck causing Core Reload to hang

2013-09-17 Thread Raheel Hasan
I think they should have it in RC0, because if you search in this forum at
lucene, this issue is there since version 4.3 !

Regards,
Raheel


On Tue, Sep 17, 2013 at 5:58 PM, Erick Erickson erickerick...@gmail.comwrote:

 H, do we have a JIRA tracking this and does it seem like any fix will
 get into 4.5?

 I think 4.5 RC0 will be cut tomorrow (Wednesday)

 Best,
 Erick


 On Tue, Sep 17, 2013 at 3:04 AM, Raheel Hasan raheelhasan@gmail.com
 wrote:

  I think there is another solution:
 
  Just hide this entry in solrconfig str
  name=spellcheck.maxCollationTries/str
 
  and instead, pass it in the actual query string that calls your
  requestHandler (like
  /select/?q=spellcheck.maxCollationTries=3...)
 
 
 
  On Mon, Sep 16, 2013 at 9:37 PM, Jeroen Steggink jer...@stegg-inc.com
  wrote:
 
   Hi James,
  
   I already had the
  
   spellcheck.**collateExtendedResults=true
  
   Adding
  
   spellcheck.**collateMaxCollectDocs=0
  
   did the trick.
  
   Thanks so much.
  
   Jeroen
  
   On 16-9-2013 18:16, Dyer, James wrote:
  
   If this started with Solr4.4, I would suspect
  https://issues.apache.org/*
   *jira/browse/SOLR-3240 
 https://issues.apache.org/jira/browse/SOLR-3240
  .
  
   Rather than removing spellcheck parameters, can you try
 adding/changing
   spellcheck.**collateMaxCollectDocs=0 and
  spellcheck.**collateExtendedResults=true
   ?  These two settings effectively disable the optimization made with
   SOLR-3240.
  
   James Dyer
   Ingram Content Group
   (615) 213-4311
  
  
 
  --
  Regards,
  Raheel Hasan
 




-- 
Regards,
Raheel Hasan


Re: spellcheck causing Core Reload to hang

2013-09-17 Thread Raheel Hasan
Check this thread:
http://lucene.472066.n3.nabble.com/Spellcheck-compounded-words-td3192748i20.htmlhttp://lucene.472066.n3.nabble.com/Spellcheck-compounded-words-td3192748i20.html#a4090320
This issue is there since 2011.



On Tue, Sep 17, 2013 at 6:35 PM, Raheel Hasan raheelhasan@gmail.comwrote:

 I think they should have it in RC0, because if you search in this forum at
 lucene, this issue is there since version 4.3 !

 Regards,
 Raheel


 On Tue, Sep 17, 2013 at 5:58 PM, Erick Erickson 
 erickerick...@gmail.comwrote:

 H, do we have a JIRA tracking this and does it seem like any fix will
 get into 4.5?

 I think 4.5 RC0 will be cut tomorrow (Wednesday)

 Best,
 Erick


 On Tue, Sep 17, 2013 at 3:04 AM, Raheel Hasan raheelhasan@gmail.com
 wrote:

  I think there is another solution:
 
  Just hide this entry in solrconfig str
  name=spellcheck.maxCollationTries/str
 
  and instead, pass it in the actual query string that calls your
  requestHandler (like
  /select/?q=spellcheck.maxCollationTries=3...)
 
 
 
  On Mon, Sep 16, 2013 at 9:37 PM, Jeroen Steggink jer...@stegg-inc.com
  wrote:
 
   Hi James,
  
   I already had the
  
   spellcheck.**collateExtendedResults=true
  
   Adding
  
   spellcheck.**collateMaxCollectDocs=0
  
   did the trick.
  
   Thanks so much.
  
   Jeroen
  
   On 16-9-2013 18:16, Dyer, James wrote:
  
   If this started with Solr4.4, I would suspect
  https://issues.apache.org/*
   *jira/browse/SOLR-3240 
 https://issues.apache.org/jira/browse/SOLR-3240
  .
  
   Rather than removing spellcheck parameters, can you try
 adding/changing
   spellcheck.**collateMaxCollectDocs=0 and
  spellcheck.**collateExtendedResults=true
   ?  These two settings effectively disable the optimization made with
   SOLR-3240.
  
   James Dyer
   Ingram Content Group
   (615) 213-4311
  
  
 
  --
  Regards,
  Raheel Hasan
 




 --
 Regards,
 Raheel Hasan




-- 
Regards,
Raheel Hasan


Re: spellcheck causing Core Reload to hang

2013-09-16 Thread Raheel Hasan
Hi,

Basically, it hangs only on core Reload and not during queries.
Furthermore, there is never any error reported in the logs, in fact the log
only records until Core-Reload call. If I shut down and restart Solr, the
next time it wont start, and still no errors in the log.




On Sat, Sep 14, 2013 at 1:53 AM, Chris Hostetter
hossman_luc...@fucit.orgwrote:


 : after a lot of investigation today, I found that its the spellcheck
 : component which is causing the issue. If its turned off, all will run
 well
 : and core can easily reload. However, when the spellcheck is on, the core
 : wont reload instead hang forever.

 Can you take some stack traces while the server is hung?

 Do you have any firstSearcher or newSearcher warming queries configured?
 If so can you try adding spellcheck=false to those warming queries and
 see if it eliminates the problem?

 Smells like this thread...

 https://mail-archives.apache.org/mod_mbox/lucene-solr-user/201309.mbox/%3Calpine.DEB.2.02.1309061149310.10818@frisbee%3E


 ...would be good to get a jira open with a reproducible set of configs
 that demonstrates the problem semi-reliably..


 -Hoss




-- 
Regards,
Raheel Hasan


Re: spellcheck causing Core Reload to hang

2013-09-16 Thread Raheel Hasan
Yes I have tried Spellcheck=false and with that everything works just fine.
But I do need Spell check component so I cant just leave it off.


On Mon, Sep 16, 2013 at 12:24 PM, Raheel Hasan raheelhasan@gmail.comwrote:

 Hi,

 Basically, it hangs only on core Reload and not during queries.
 Furthermore, there is never any error reported in the logs, in fact the log
 only records until Core-Reload call. If I shut down and restart Solr, the
 next time it wont start, and still no errors in the log.




 On Sat, Sep 14, 2013 at 1:53 AM, Chris Hostetter hossman_luc...@fucit.org
  wrote:


 : after a lot of investigation today, I found that its the spellcheck
 : component which is causing the issue. If its turned off, all will run
 well
 : and core can easily reload. However, when the spellcheck is on, the core
 : wont reload instead hang forever.

 Can you take some stack traces while the server is hung?

 Do you have any firstSearcher or newSearcher warming queries configured?
 If so can you try adding spellcheck=false to those warming queries and
 see if it eliminates the problem?

 Smells like this thread...

 https://mail-archives.apache.org/mod_mbox/lucene-solr-user/201309.mbox/%3Calpine.DEB.2.02.1309061149310.10818@frisbee%3E


 ...would be good to get a jira open with a reproducible set of configs
 that demonstrates the problem semi-reliably..


 -Hoss




 --
 Regards,
 Raheel Hasan




-- 
Regards,
Raheel Hasan


Re: spellcheck causing Core Reload to hang

2013-09-16 Thread Raheel Hasan
Please see the log (after solr restart) in the other msg I posted on this
forum with the subject: *Unable to connect to http://localhost:8983/solr/
*

Thanks.



On Mon, Sep 16, 2013 at 12:25 PM, Raheel Hasan raheelhasan@gmail.comwrote:

 Yes I have tried Spellcheck=false and with that everything works just
 fine. But I do need Spell check component so I cant just leave it off.


 On Mon, Sep 16, 2013 at 12:24 PM, Raheel Hasan 
 raheelhasan@gmail.comwrote:

 Hi,

 Basically, it hangs only on core Reload and not during queries.
 Furthermore, there is never any error reported in the logs, in fact the log
 only records until Core-Reload call. If I shut down and restart Solr, the
 next time it wont start, and still no errors in the log.




 On Sat, Sep 14, 2013 at 1:53 AM, Chris Hostetter 
 hossman_luc...@fucit.org wrote:


 : after a lot of investigation today, I found that its the spellcheck
 : component which is causing the issue. If its turned off, all will run
 well
 : and core can easily reload. However, when the spellcheck is on, the
 core
 : wont reload instead hang forever.

 Can you take some stack traces while the server is hung?

 Do you have any firstSearcher or newSearcher warming queries configured?
 If so can you try adding spellcheck=false to those warming queries and
 see if it eliminates the problem?

 Smells like this thread...

 https://mail-archives.apache.org/mod_mbox/lucene-solr-user/201309.mbox/%3Calpine.DEB.2.02.1309061149310.10818@frisbee%3E


 ...would be good to get a jira open with a reproducible set of configs
 that demonstrates the problem semi-reliably..


 -Hoss




 --
 Regards,
 Raheel Hasan




 --
 Regards,
 Raheel Hasan




-- 
Regards,
Raheel Hasan


Re: Spellcheck compounded words

2013-09-16 Thread Rah1x
Hi guyz,

Did anyone solve this issue?

I am having it also, it took me 3 days to exactly figure it out that its
coming from spellcheck.maxCollationTries...

Even with str name=spellcheck.maxCollationTries1/str it hangs
forewver. The only way to restart is to stop solr, delete data folder and
then start solr again (i.e. index lost !).

Regards,
Raheel



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Spellcheck-compounded-words-tp3192748p4090320.html
Sent from the Solr - User mailing list archive at Nabble.com.


RE: Spellcheck compounded words

2013-09-16 Thread Dyer, James
Which version of Solr are you running? (the post you replied to was about Solr 
3.3, but the latest version now is 4.4.)  Please provide configuration details 
and the query you are running that causes the problem.  Also explain exactly 
what the problem is (query never returns?).  Also explain why you have to 
delete the data dir when you restart.  With a little background information, 
maybe someone can help.

James Dyer
Ingram Content Group
(615) 213-4311

-Original Message-
From: Rah1x [mailto:raheel_itst...@yahoo.com] 
Sent: Monday, September 16, 2013 5:47 AM
To: solr-user@lucene.apache.org
Subject: Re: Spellcheck compounded words

Hi guyz,

Did anyone solve this issue?

I am having it also, it took me 3 days to exactly figure it out that its
coming from spellcheck.maxCollationTries...

Even with str name=spellcheck.maxCollationTries1/str it hangs
forewver. The only way to restart is to stop solr, delete data folder and
then start solr again (i.e. index lost !).

Regards,
Raheel



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Spellcheck-compounded-words-tp3192748p4090320.html
Sent from the Solr - User mailing list archive at Nabble.com.




Re: Spellcheck compounded words

2013-09-16 Thread Raheel Hasan
Hi,

I m running 4.3..

I have posted all the details in another threat... do you want me to copy
it here? or could you see that? The subject is *spellcheck causing Core
Reload to hang*.




On Mon, Sep 16, 2013 at 5:50 PM, Dyer, James
james.d...@ingramcontent.comwrote:

 Which version of Solr are you running? (the post you replied to was about
 Solr 3.3, but the latest version now is 4.4.)  Please provide configuration
 details and the query you are running that causes the problem.  Also
 explain exactly what the problem is (query never returns?).  Also explain
 why you have to delete the data dir when you restart.  With a little
 background information, maybe someone can help.

 James Dyer
 Ingram Content Group
 (615) 213-4311

 -Original Message-
 From: Rah1x [mailto:raheel_itst...@yahoo.com]
 Sent: Monday, September 16, 2013 5:47 AM
 To: solr-user@lucene.apache.org
 Subject: Re: Spellcheck compounded words

 Hi guyz,

 Did anyone solve this issue?

 I am having it also, it took me 3 days to exactly figure it out that its
 coming from spellcheck.maxCollationTries...

 Even with str name=spellcheck.maxCollationTries1/str it hangs
 forewver. The only way to restart is to stop solr, delete data folder and
 then start solr again (i.e. index lost !).

 Regards,
 Raheel



 --
 View this message in context:
 http://lucene.472066.n3.nabble.com/Spellcheck-compounded-words-tp3192748p4090320.html
 Sent from the Solr - User mailing list archive at Nabble.com.





-- 
Regards,
Raheel Hasan


RE: Spellcheck compounded words

2013-09-16 Thread Dyer, James
I would investigate Hoss's suggestion and look at warming queries.  In some 
cases I've seen maxCollationTries in warming queries to cause a hang.  Unless 
you're trying to build your spellcheck dictionary during warming, you can 
safely turn spellcheck off for all warming queries.

James Dyer
Ingram Content Group
(615) 213-4311


-Original Message-
From: Raheel Hasan [mailto:raheelhasan@gmail.com] 
Sent: Monday, September 16, 2013 8:29 AM
To: solr-user@lucene.apache.org
Subject: Re: Spellcheck compounded words

Hi,

I m running 4.3..

I have posted all the details in another threat... do you want me to copy
it here? or could you see that? The subject is *spellcheck causing Core
Reload to hang*.




On Mon, Sep 16, 2013 at 5:50 PM, Dyer, James
james.d...@ingramcontent.comwrote:

 Which version of Solr are you running? (the post you replied to was about
 Solr 3.3, but the latest version now is 4.4.)  Please provide configuration
 details and the query you are running that causes the problem.  Also
 explain exactly what the problem is (query never returns?).  Also explain
 why you have to delete the data dir when you restart.  With a little
 background information, maybe someone can help.

 James Dyer
 Ingram Content Group
 (615) 213-4311

 -Original Message-
 From: Rah1x [mailto:raheel_itst...@yahoo.com]
 Sent: Monday, September 16, 2013 5:47 AM
 To: solr-user@lucene.apache.org
 Subject: Re: Spellcheck compounded words

 Hi guyz,

 Did anyone solve this issue?

 I am having it also, it took me 3 days to exactly figure it out that its
 coming from spellcheck.maxCollationTries...

 Even with str name=spellcheck.maxCollationTries1/str it hangs
 forewver. The only way to restart is to stop solr, delete data folder and
 then start solr again (i.e. index lost !).

 Regards,
 Raheel



 --
 View this message in context:
 http://lucene.472066.n3.nabble.com/Spellcheck-compounded-words-tp3192748p4090320.html
 Sent from the Solr - User mailing list archive at Nabble.com.





-- 
Regards,
Raheel Hasan



Re: Spellcheck compounded words

2013-09-16 Thread Raheel Hasan
I am building it on Commit..
str name=buildOnCommittrue/str

Please see my other thread for all Logs and Schema + Solrconfig settings.


On Mon, Sep 16, 2013 at 7:03 PM, Dyer, James
james.d...@ingramcontent.comwrote:

 I would investigate Hoss's suggestion and look at warming queries.  In
 some cases I've seen maxCollationTries in warming queries to cause a
 hang.  Unless you're trying to build your spellcheck dictionary during
 warming, you can safely turn spellcheck off for all warming queries.

 James Dyer
 Ingram Content Group
 (615) 213-4311


 -Original Message-
 From: Raheel Hasan [mailto:raheelhasan@gmail.com]
 Sent: Monday, September 16, 2013 8:29 AM
 To: solr-user@lucene.apache.org
 Subject: Re: Spellcheck compounded words

 Hi,

 I m running 4.3..

 I have posted all the details in another threat... do you want me to copy
 it here? or could you see that? The subject is *spellcheck causing Core
 Reload to hang*.




 On Mon, Sep 16, 2013 at 5:50 PM, Dyer, James
 james.d...@ingramcontent.comwrote:

  Which version of Solr are you running? (the post you replied to was about
  Solr 3.3, but the latest version now is 4.4.)  Please provide
 configuration
  details and the query you are running that causes the problem.  Also
  explain exactly what the problem is (query never returns?).  Also explain
  why you have to delete the data dir when you restart.  With a little
  background information, maybe someone can help.
 
  James Dyer
  Ingram Content Group
  (615) 213-4311
 
  -Original Message-
  From: Rah1x [mailto:raheel_itst...@yahoo.com]
  Sent: Monday, September 16, 2013 5:47 AM
  To: solr-user@lucene.apache.org
  Subject: Re: Spellcheck compounded words
 
  Hi guyz,
 
  Did anyone solve this issue?
 
  I am having it also, it took me 3 days to exactly figure it out that its
  coming from spellcheck.maxCollationTries...
 
  Even with str name=spellcheck.maxCollationTries1/str it hangs
  forewver. The only way to restart is to stop solr, delete data folder
 and
  then start solr again (i.e. index lost !).
 
  Regards,
  Raheel
 
 
 
  --
  View this message in context:
 
 http://lucene.472066.n3.nabble.com/Spellcheck-compounded-words-tp3192748p4090320.html
  Sent from the Solr - User mailing list archive at Nabble.com.
 
 
 


 --
 Regards,
 Raheel Hasan




-- 
Regards,
Raheel Hasan


Re: spellcheck causing Core Reload to hang

2013-09-13 Thread tamanjit.bin...@yahoo.co.in
Any specific error? Anything in the logs when it hangs?



--
View this message in context: 
http://lucene.472066.n3.nabble.com/spellcheck-causing-Core-Reload-to-hang-tp4089866p4089931.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: spellcheck causing Core Reload to hang

2013-09-13 Thread Chris Hostetter

: after a lot of investigation today, I found that its the spellcheck
: component which is causing the issue. If its turned off, all will run well
: and core can easily reload. However, when the spellcheck is on, the core
: wont reload instead hang forever.

Can you take some stack traces while the server is hung?

Do you have any firstSearcher or newSearcher warming queries configured?  
If so can you try adding spellcheck=false to those warming queries and 
see if it eliminates the problem?

Smells like this thread...
https://mail-archives.apache.org/mod_mbox/lucene-solr-user/201309.mbox/%3Calpine.DEB.2.02.1309061149310.10818@frisbee%3E


...would be good to get a jira open with a reproducible set of configs 
that demonstrates the problem semi-reliably..


-Hoss


Re: spellcheck and search in a same solr request

2013-07-24 Thread Otis Gospodnetic
Hi Manasi,

Have a look at http://sematext.com/products/dym-researcher/index.html
- it sounds like exactly what you are after.

Otis
--
Solr  ElasticSearch Support -- http://sematext.com/
Performance Monitoring -- http://sematext.com/spm



On Tue, Jul 23, 2013 at 1:29 AM, smanad sma...@gmail.com wrote:
 Hey,

 Is there a way to do spellcheck and search (using suggestions returned from
 spellcheck) in a single Solr request?

 I am seeing that if my query is spelled correctly, i get results but if
 misspelled, I just get suggestions.

 Any pointers will be very helpful.
 Thanks,
 -Manasi



 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/spellcheck-and-search-in-a-same-solr-request-tp4079571.html
 Sent from the Solr - User mailing list archive at Nabble.com.


RE: spellcheck and search in a same solr request

2013-07-23 Thread Dyer, James
Solr doesn't support any kind of short-circuting the original query and 
returning the results of the corrected query or collation.  You just re-issue 
the query in a second request.  This would be a nice feature to add though.

James Dyer
Ingram Content Group
(615) 213-4311

-Original Message-
From: smanad [mailto:sma...@gmail.com] 
Sent: Monday, July 22, 2013 6:29 PM
To: solr-user@lucene.apache.org
Subject: spellcheck and search in a same solr request

Hey, 

Is there a way to do spellcheck and search (using suggestions returned from
spellcheck) in a single Solr request?

I am seeing that if my query is spelled correctly, i get results but if
misspelled, I just get suggestions.

Any pointers will be very helpful.
Thanks, 
-Manasi



--
View this message in context: 
http://lucene.472066.n3.nabble.com/spellcheck-and-search-in-a-same-solr-request-tp4079571.html
Sent from the Solr - User mailing list archive at Nabble.com.




RE: Spellcheck field element and collation issues

2013-07-23 Thread Dyer, James
For this query:

http://localhost:8981/solr/articles/select?indent=trueq=Perfrm%20HVCrows=0

...do you get anything back in the spellcheck response?  Is it correcting the 
individual words and not giving collations?  Or are you getting no individual 
word suggestions also?

James Dyer
Ingram Content Group
(615) 213-4311


-Original Message-
From: Brendan Grainger [mailto:brendan.grain...@gmail.com] 
Sent: Tuesday, July 23, 2013 1:47 PM
To: solr-user@lucene.apache.org
Subject: Spellcheck field element and collation issues

Hi All,

I have an IndexBasedSpellChecker component configured as follows (note the
field parameter is set to the spellcheck field):

  searchComponent name=spellcheck class=solr.SpellCheckComponent

str name=queryAnalyzerFieldTypetext_spell/str

lst name=spellchecker
  str name=namedefault/str
  str name=classnamesolr.IndexBasedSpellChecker/str
  !--
  Load tokens from the following field for spell checking,
  analyzer for the field's type as defined in schema.xml are used
  --
*  str name=fieldspellcheck/str*
  str name=spellcheckIndexDir./spellchecker/str
  float name=thresholdTokenFrequency.0001/float
/lst
  /searchComponent

with the corresponding field type for spellcheck:

fieldType name=text_spell class=solr.TextField
positionIncrementGap=100 omitNorms=true
  analyzer type=index
tokenizer class=solr.StandardTokenizerFactory/
filter class=solr.StopFilterFactory
ignoreCase=true
words=lang/stopwords_en.txt
enablePositionIncrements=true
/
filter class=solr.LowerCaseFilterFactory/
filter class=solr.StandardFilterFactory/
  /analyzer
  analyzer type=query
tokenizer class=solr.StandardTokenizerFactory/
filter class=solr.SynonymFilterFactory
synonyms=moto_synonyms.txt ignoreCase=true expand=true/
filter class=solr.StopFilterFactory
ignoreCase=true
words=lang/stopwords_en.txt
enablePositionIncrements=true
/
filter class=solr.LowerCaseFilterFactory/
filter class=solr.StandardFilterFactory/
  /analyzer
/fieldType

and field:

!-- spellcheck field is multivalued because it has the title and markup
  fields copied into it --
field name=spellcheck type=text_spell stored=false
omitTermFreqAndPositions=true multiValued=true/

values from a markup and title field are copied into the spellcheck field.

My /select search component has the following defaults:

lst name=defaults
  str name=echoParamsexplicit/str
  int name=rows10/int
  str name=dfmarkup_texts title_texts/str

  !-- Spell checking defaults --
  str name=spellchecktrue/str
  str name=spellcheck.collateExtendedResultstrue/str
  str name=spellcheck.extendedResultstrue/str
  str name=spellcheck.maxCollations2/str
  str name=spellcheck.maxCollationTries5/str
  str name=spellcheck.count5/str
  str name=spellcheck.collatetrue/str

  str name=spellcheck.maxResultsForSuggest5/str
  str name=spellcheck.alternativeTermCount5/str

 /lst


When I issue a search like this:

http://localhost:8981/solr/articles/select?indent=truespellcheck.q=markup_texts:(Perfrm%20HVC)q=Perfrm%20HVCrows=0

I get collations:

lst name=collation
str name=collationQuerymarkup_texts:(perform hvac)/str
int name=hits4/int
lst name=misspellingsAndCorrections
str name=perfrmperform/str
str name=hvchvac/str
/lst
/lst
lst name=collation
str name=collationQuerymarkup_texts:(performed hvac)/str
int name=hits4/int
lst name=misspellingsAndCorrections
str name=perfrmperformed/str
str name=hvchvac/str
/lst
/lst

However, if I remove the spellcheck.q parameter I do not, i.e. no
collations are returned for the following:

http://localhost:8981/solr/articles/select?indent=trueq=Perfrm%20HVCrows=0



If I specify the fields being searched over for the q parameter I get
collations:

http://localhost:8981/solr/articles/select?indent=trueq=markup_texts:(Perfrm%20HVC)rows=0

lst name=collation
str name=collationQuerymarkup_texts:(perform hvac)/str
int name=hits4/int
lst name=misspellingsAndCorrections
str name=perfrmperform/str
str name=hvchvac/str
/lst
/lst
lst name=collation
str name=collationQuerymarkup_texts:(performed hvac)/str
int name=hits4/int
lst name=misspellingsAndCorrections
str name=perfrmperformed/str
str name=hvchvac/str
/lst
/lst


I'm a bit confused as to what the value for field should be in spellcheck
component definition. In fact what is it's purpose here, just as the input
for building the spellchecking index? If that is so then why do I need to
even specify the queryAnalyzerFieldType?

Also, why do I need to explicitly specify the field in the query or
spellcheck.q to get collations?

Thanks and sorry for the rather long question.

Brendan


Re: Spellcheck field element and collation issues

2013-07-23 Thread Brendan Grainger
Hi James,

I get the following response for that query:

response
lst name=responseHeader
int name=status0/int
int name=QTime8/int
lst name=params
str name=indenttrue/str
str name=qPerfrm HVC/str
str name=rows0/str
/lst
/lst
result name=response numFound=0 start=0/result
lst name=spellcheck
lst name=suggestions
lst name=perfrm
int name=numFound3/int
int name=startOffset0/int
int name=endOffset6/int
int name=origFreq0/int
arr name=suggestion
lst
str name=wordperform/str
int name=freq4/int
/lst
lst
str name=wordperformed/str
int name=freq1/int
/lst
lst
str name=wordperformance/str
int name=freq3/int
/lst
/arr
/lst
lst name=hvc
int name=numFound2/int
int name=startOffset7/int
int name=endOffset10/int
int name=origFreq0/int
arr name=suggestion
lst
str name=wordhvac/str
int name=freq4/int
/lst
lst
str name=wordhave/str
int name=freq5/int
/lst
/arr
/lst
bool name=correctlySpelledfalse/bool
/lst
/lst
/response

Thanks
Brendan


On Tue, Jul 23, 2013 at 3:19 PM, Dyer, James
james.d...@ingramcontent.comwrote:

 For this query:


 http://localhost:8981/solr/articles/select?indent=trueq=Perfrm%20HVCrows=0

 ...do you get anything back in the spellcheck response?  Is it correcting
 the individual words and not giving collations?  Or are you getting no
 individual word suggestions also?

 James Dyer
 Ingram Content Group
 (615) 213-4311


 -Original Message-
 From: Brendan Grainger [mailto:brendan.grain...@gmail.com]
 Sent: Tuesday, July 23, 2013 1:47 PM
 To: solr-user@lucene.apache.org
 Subject: Spellcheck field element and collation issues

 Hi All,

 I have an IndexBasedSpellChecker component configured as follows (note the
 field parameter is set to the spellcheck field):

   searchComponent name=spellcheck class=solr.SpellCheckComponent

 str name=queryAnalyzerFieldTypetext_spell/str

 lst name=spellchecker
   str name=namedefault/str
   str name=classnamesolr.IndexBasedSpellChecker/str
   !--
   Load tokens from the following field for spell checking,
   analyzer for the field's type as defined in schema.xml are used
   --
 *  str name=fieldspellcheck/str*
   str name=spellcheckIndexDir./spellchecker/str
   float name=thresholdTokenFrequency.0001/float
 /lst
   /searchComponent

 with the corresponding field type for spellcheck:

 fieldType name=text_spell class=solr.TextField
 positionIncrementGap=100 omitNorms=true
   analyzer type=index
 tokenizer class=solr.StandardTokenizerFactory/
 filter class=solr.StopFilterFactory
 ignoreCase=true
 words=lang/stopwords_en.txt
 enablePositionIncrements=true
 /
 filter class=solr.LowerCaseFilterFactory/
 filter class=solr.StandardFilterFactory/
   /analyzer
   analyzer type=query
 tokenizer class=solr.StandardTokenizerFactory/
 filter class=solr.SynonymFilterFactory
 synonyms=moto_synonyms.txt ignoreCase=true expand=true/
 filter class=solr.StopFilterFactory
 ignoreCase=true
 words=lang/stopwords_en.txt
 enablePositionIncrements=true
 /
 filter class=solr.LowerCaseFilterFactory/
 filter class=solr.StandardFilterFactory/
   /analyzer
 /fieldType

 and field:

 !-- spellcheck field is multivalued because it has the title and
 markup
   fields copied into it --
 field name=spellcheck type=text_spell stored=false
 omitTermFreqAndPositions=true multiValued=true/

 values from a markup and title field are copied into the spellcheck field.

 My /select search component has the following defaults:

 lst name=defaults
   str name=echoParamsexplicit/str
   int name=rows10/int
   str name=dfmarkup_texts title_texts/str

   !-- Spell checking defaults --
   str name=spellchecktrue/str
   str name=spellcheck.collateExtendedResultstrue/str
   str name=spellcheck.extendedResultstrue/str
   str name=spellcheck.maxCollations2/str
   str name=spellcheck.maxCollationTries5/str
   str name=spellcheck.count5/str
   str name=spellcheck.collatetrue/str

   str name=spellcheck.maxResultsForSuggest5/str
   str name=spellcheck.alternativeTermCount5/str

  /lst


 When I issue a search like this:


 http://localhost:8981/solr/articles/select?indent=truespellcheck.q=markup_texts:(Perfrm%20HVC)q=Perfrm%20HVCrows=0

 I get collations:

 lst name=collation
 str name=collationQuerymarkup_texts:(perform hvac)/str
 int name=hits4/int
 lst name=misspellingsAndCorrections
 str name=perfrmperform/str
 str name=hvchvac/str
 /lst
 /lst
 lst name=collation
 str name=collationQuerymarkup_texts:(performed hvac)/str
 int name=hits4/int
 lst name=misspellingsAndCorrections
 str name=perfrmperformed/str
 str name=hvchvac/str
 /lst
 /lst

 However, if I remove the spellcheck.q parameter I do not, i.e. no
 collations are returned for the following:


 

Re: Spellcheck field element and collation issues

2013-07-23 Thread Brendan Grainger
Hi James,

If I try:

http://localhost:8981/solr/articles/select?indent=trueq=Perfrm%20HVCrows=0maxCollationTries=0

I get the same result:

response
lst name=responseHeader
int name=status0/int
int name=QTime7/int
lst name=params
str name=indenttrue/str
str name=qPerfrm HVC/str
str name=maxCollationTries0/str
str name=rows0/str
/lst
/lst
result name=response numFound=0 start=0/result
lst name=spellcheck
lst name=suggestions
lst name=perfrm
int name=numFound3/int
int name=startOffset0/int
int name=endOffset6/int
int name=origFreq0/int
arr name=suggestion
lst
str name=wordperform/str
int name=freq4/int
/lst
lst
str name=wordperformed/str
int name=freq1/int
/lst
lst
str name=wordperformance/str
int name=freq3/int
/lst
/arr
/lst
lst name=hvc
int name=numFound2/int
int name=startOffset7/int
int name=endOffset10/int
int name=origFreq0/int
arr name=suggestion
lst
str name=wordhvac/str
int name=freq4/int
/lst
lst
str name=wordhave/str
int name=freq5/int
/lst
/arr
/lst
bool name=correctlySpelledfalse/bool
/lst
/lst
/response

However, you're right that my df field for the /select handler is in fact:

 str name=dfmarkup_texts title_texts/str

I would note that if I specify the query as follows:

http://localhost:8981/solr/articles/select?indent=trueq=markup_texts:(Perfrm%20HVC)+OR+title_texts:(Perfrm%20HVC)rows=0maxCollationTries=0

which is what I thought specifying a df would effectively do, I get
collation results:

lst name=collation
str name=collationQuery
markup_texts:(perform hvac) OR title_texts:(perform hvac)
/str
int name=hits4/int
lst name=misspellingsAndCorrections
str name=perfrmperform/str
str name=hvchvac/str
str name=perfrmperform/str
str name=hvchvac/str
/lst
/lst
lst name=collation
str name=collationQuery
markup_texts:(perform hvac) OR title_texts:(performed hvac)
/str
int name=hits4/int
lst name=misspellingsAndCorrections
str name=perfrmperform/str
str name=hvchvac/str
str name=perfrmperformed/str
str name=hvchvac/str
/lst
/lst

I think I'm confused about the relationship between the q parameter and
what the field and queryAnalyzerFieldType are for in the spellcheck
component definition, i.e. what is this for:

   str name=fieldspellcheck/str

is it even needed if I've specified how the spelling index terms should
analyzed with:

   str name=queryAnalyzerFieldTypetext_spell/str

Thanks again
Brendan





On Tue, Jul 23, 2013 at 3:58 PM, Dyer, James
james.d...@ingramcontent.comwrote:

 Try tacking maxCollationTries=0 to the URL and see if the collation
 returns.

 If you get a collation, then try the same URL with the collation as the
 q parameter.  Does that get results?

 My suspicion here is that you are assuming that markup_texts is the
 default search field for /select but in fact it isn't.

 James Dyer
 Ingram Content Group
 (615) 213-4311


 -Original Message-
 From: Brendan Grainger [mailto:brendan.grain...@gmail.com]
 Sent: Tuesday, July 23, 2013 2:43 PM
 To: solr-user@lucene.apache.org
 Subject: Re: Spellcheck field element and collation issues

 Hi James,

 I get the following response for that query:

 response
 lst name=responseHeader
 int name=status0/int
 int name=QTime8/int
 lst name=params
 str name=indenttrue/str
 str name=qPerfrm HVC/str
 str name=rows0/str
 /lst
 /lst
 result name=response numFound=0 start=0/result
 lst name=spellcheck
 lst name=suggestions
 lst name=perfrm
 int name=numFound3/int
 int name=startOffset0/int
 int name=endOffset6/int
 int name=origFreq0/int
 arr name=suggestion
 lst
 str name=wordperform/str
 int name=freq4/int
 /lst
 lst
 str name=wordperformed/str
 int name=freq1/int
 /lst
 lst
 str name=wordperformance/str
 int name=freq3/int
 /lst
 /arr
 /lst
 lst name=hvc
 int name=numFound2/int
 int name=startOffset7/int
 int name=endOffset10/int
 int name=origFreq0/int
 arr name=suggestion
 lst
 str name=wordhvac/str
 int name=freq4/int
 /lst
 lst
 str name=wordhave/str
 int name=freq5/int
 /lst
 /arr
 /lst
 bool name=correctlySpelledfalse/bool
 /lst
 /lst
 /response

 Thanks
 Brendan


 On Tue, Jul 23, 2013 at 3:19 PM, Dyer, James
 james.d...@ingramcontent.comwrote:

  For this query:
 
 
 
 http://localhost:8981/solr/articles/select?indent=trueq=Perfrm%20HVCrows=0
 
  ...do you get anything back in the spellcheck response?  Is it correcting
  the individual words and not giving collations?  Or are you getting no
  individual word suggestions also?
 
  James Dyer
  Ingram Content Group
  (615) 213-4311
 
 
  -Original Message-
  From: Brendan Grainger [mailto:brendan.grain...@gmail.com]
  Sent: Tuesday, July 23, 2013 1:47 PM
  To: solr-user@lucene.apache.org
  Subject: Spellcheck field element and collation issues
 
  Hi All,
 
  I have an IndexBasedSpellChecker component configured as follows (note
 the
  field parameter is set to the spellcheck field):
 
searchComponent name=spellcheck class=solr.SpellCheckComponent
 
  str name=queryAnalyzerFieldTypetext_spell/str
 
  lst name=spellchecker
str name=namedefault

RE: Spellcheck field element and collation issues

2013-07-23 Thread Dyer, James
Try tacking maxCollationTries=0 to the URL and see if the collation returns.

If you get a collation, then try the same URL with the collation as the q 
parameter.  Does that get results?

My suspicion here is that you are assuming that markup_texts is the default 
search field for /select but in fact it isn't.

James Dyer
Ingram Content Group
(615) 213-4311


-Original Message-
From: Brendan Grainger [mailto:brendan.grain...@gmail.com] 
Sent: Tuesday, July 23, 2013 2:43 PM
To: solr-user@lucene.apache.org
Subject: Re: Spellcheck field element and collation issues

Hi James,

I get the following response for that query:

response
lst name=responseHeader
int name=status0/int
int name=QTime8/int
lst name=params
str name=indenttrue/str
str name=qPerfrm HVC/str
str name=rows0/str
/lst
/lst
result name=response numFound=0 start=0/result
lst name=spellcheck
lst name=suggestions
lst name=perfrm
int name=numFound3/int
int name=startOffset0/int
int name=endOffset6/int
int name=origFreq0/int
arr name=suggestion
lst
str name=wordperform/str
int name=freq4/int
/lst
lst
str name=wordperformed/str
int name=freq1/int
/lst
lst
str name=wordperformance/str
int name=freq3/int
/lst
/arr
/lst
lst name=hvc
int name=numFound2/int
int name=startOffset7/int
int name=endOffset10/int
int name=origFreq0/int
arr name=suggestion
lst
str name=wordhvac/str
int name=freq4/int
/lst
lst
str name=wordhave/str
int name=freq5/int
/lst
/arr
/lst
bool name=correctlySpelledfalse/bool
/lst
/lst
/response

Thanks
Brendan


On Tue, Jul 23, 2013 at 3:19 PM, Dyer, James
james.d...@ingramcontent.comwrote:

 For this query:


 http://localhost:8981/solr/articles/select?indent=trueq=Perfrm%20HVCrows=0

 ...do you get anything back in the spellcheck response?  Is it correcting
 the individual words and not giving collations?  Or are you getting no
 individual word suggestions also?

 James Dyer
 Ingram Content Group
 (615) 213-4311


 -Original Message-
 From: Brendan Grainger [mailto:brendan.grain...@gmail.com]
 Sent: Tuesday, July 23, 2013 1:47 PM
 To: solr-user@lucene.apache.org
 Subject: Spellcheck field element and collation issues

 Hi All,

 I have an IndexBasedSpellChecker component configured as follows (note the
 field parameter is set to the spellcheck field):

   searchComponent name=spellcheck class=solr.SpellCheckComponent

 str name=queryAnalyzerFieldTypetext_spell/str

 lst name=spellchecker
   str name=namedefault/str
   str name=classnamesolr.IndexBasedSpellChecker/str
   !--
   Load tokens from the following field for spell checking,
   analyzer for the field's type as defined in schema.xml are used
   --
 *  str name=fieldspellcheck/str*
   str name=spellcheckIndexDir./spellchecker/str
   float name=thresholdTokenFrequency.0001/float
 /lst
   /searchComponent

 with the corresponding field type for spellcheck:

 fieldType name=text_spell class=solr.TextField
 positionIncrementGap=100 omitNorms=true
   analyzer type=index
 tokenizer class=solr.StandardTokenizerFactory/
 filter class=solr.StopFilterFactory
 ignoreCase=true
 words=lang/stopwords_en.txt
 enablePositionIncrements=true
 /
 filter class=solr.LowerCaseFilterFactory/
 filter class=solr.StandardFilterFactory/
   /analyzer
   analyzer type=query
 tokenizer class=solr.StandardTokenizerFactory/
 filter class=solr.SynonymFilterFactory
 synonyms=moto_synonyms.txt ignoreCase=true expand=true/
 filter class=solr.StopFilterFactory
 ignoreCase=true
 words=lang/stopwords_en.txt
 enablePositionIncrements=true
 /
 filter class=solr.LowerCaseFilterFactory/
 filter class=solr.StandardFilterFactory/
   /analyzer
 /fieldType

 and field:

 !-- spellcheck field is multivalued because it has the title and
 markup
   fields copied into it --
 field name=spellcheck type=text_spell stored=false
 omitTermFreqAndPositions=true multiValued=true/

 values from a markup and title field are copied into the spellcheck field.

 My /select search component has the following defaults:

 lst name=defaults
   str name=echoParamsexplicit/str
   int name=rows10/int
   str name=dfmarkup_texts title_texts/str

   !-- Spell checking defaults --
   str name=spellchecktrue/str
   str name=spellcheck.collateExtendedResultstrue/str
   str name=spellcheck.extendedResultstrue/str
   str name=spellcheck.maxCollations2/str
   str name=spellcheck.maxCollationTries5/str
   str name=spellcheck.count5/str
   str name=spellcheck.collatetrue/str

   str name=spellcheck.maxResultsForSuggest5/str
   str name=spellcheck.alternativeTermCount5/str

  /lst


 When I issue a search like this:


 http://localhost:8981/solr/articles/select?indent=truespellcheck.q=markup_texts

RE: Spellcheck field element and collation issues

2013-07-23 Thread Dyer, James
I don't believe you can specify more than 1 field on df (default field).  
What you want, I think, is qf (query fields), which is available only if 
using dismax/edismax.

http://wiki.apache.org/solr/SearchHandler#df
http://wiki.apache.org/solr/ExtendedDisMax#qf_.28Query_Fields.29

James Dyer
Ingram Content Group
(615) 213-4311


-Original Message-
From: Brendan Grainger [mailto:brendan.grain...@gmail.com] 
Sent: Tuesday, July 23, 2013 3:22 PM
To: solr-user@lucene.apache.org
Subject: Re: Spellcheck field element and collation issues

Hi James,

If I try:

http://localhost:8981/solr/articles/select?indent=trueq=Perfrm%20HVCrows=0maxCollationTries=0

I get the same result:

response
lst name=responseHeader
int name=status0/int
int name=QTime7/int
lst name=params
str name=indenttrue/str
str name=qPerfrm HVC/str
str name=maxCollationTries0/str
str name=rows0/str
/lst
/lst
result name=response numFound=0 start=0/result
lst name=spellcheck
lst name=suggestions
lst name=perfrm
int name=numFound3/int
int name=startOffset0/int
int name=endOffset6/int
int name=origFreq0/int
arr name=suggestion
lst
str name=wordperform/str
int name=freq4/int
/lst
lst
str name=wordperformed/str
int name=freq1/int
/lst
lst
str name=wordperformance/str
int name=freq3/int
/lst
/arr
/lst
lst name=hvc
int name=numFound2/int
int name=startOffset7/int
int name=endOffset10/int
int name=origFreq0/int
arr name=suggestion
lst
str name=wordhvac/str
int name=freq4/int
/lst
lst
str name=wordhave/str
int name=freq5/int
/lst
/arr
/lst
bool name=correctlySpelledfalse/bool
/lst
/lst
/response

However, you're right that my df field for the /select handler is in fact:

 str name=dfmarkup_texts title_texts/str

I would note that if I specify the query as follows:

http://localhost:8981/solr/articles/select?indent=trueq=markup_texts:(Perfrm%20HVC)+OR+title_texts:(Perfrm%20HVC)rows=0maxCollationTries=0

which is what I thought specifying a df would effectively do, I get
collation results:

lst name=collation
str name=collationQuery
markup_texts:(perform hvac) OR title_texts:(perform hvac)
/str
int name=hits4/int
lst name=misspellingsAndCorrections
str name=perfrmperform/str
str name=hvchvac/str
str name=perfrmperform/str
str name=hvchvac/str
/lst
/lst
lst name=collation
str name=collationQuery
markup_texts:(perform hvac) OR title_texts:(performed hvac)
/str
int name=hits4/int
lst name=misspellingsAndCorrections
str name=perfrmperform/str
str name=hvchvac/str
str name=perfrmperformed/str
str name=hvchvac/str
/lst
/lst

I think I'm confused about the relationship between the q parameter and
what the field and queryAnalyzerFieldType are for in the spellcheck
component definition, i.e. what is this for:

   str name=fieldspellcheck/str

is it even needed if I've specified how the spelling index terms should
analyzed with:

   str name=queryAnalyzerFieldTypetext_spell/str

Thanks again
Brendan





On Tue, Jul 23, 2013 at 3:58 PM, Dyer, James
james.d...@ingramcontent.comwrote:

 Try tacking maxCollationTries=0 to the URL and see if the collation
 returns.

 If you get a collation, then try the same URL with the collation as the
 q parameter.  Does that get results?

 My suspicion here is that you are assuming that markup_texts is the
 default search field for /select but in fact it isn't.

 James Dyer
 Ingram Content Group
 (615) 213-4311


 -Original Message-
 From: Brendan Grainger [mailto:brendan.grain...@gmail.com]
 Sent: Tuesday, July 23, 2013 2:43 PM
 To: solr-user@lucene.apache.org
 Subject: Re: Spellcheck field element and collation issues

 Hi James,

 I get the following response for that query:

 response
 lst name=responseHeader
 int name=status0/int
 int name=QTime8/int
 lst name=params
 str name=indenttrue/str
 str name=qPerfrm HVC/str
 str name=rows0/str
 /lst
 /lst
 result name=response numFound=0 start=0/result
 lst name=spellcheck
 lst name=suggestions
 lst name=perfrm
 int name=numFound3/int
 int name=startOffset0/int
 int name=endOffset6/int
 int name=origFreq0/int
 arr name=suggestion
 lst
 str name=wordperform/str
 int name=freq4/int
 /lst
 lst
 str name=wordperformed/str
 int name=freq1/int
 /lst
 lst
 str name=wordperformance/str
 int name=freq3/int
 /lst
 /arr
 /lst
 lst name=hvc
 int name=numFound2/int
 int name=startOffset7/int
 int name=endOffset10/int
 int name=origFreq0/int
 arr name=suggestion
 lst
 str name=wordhvac/str
 int name=freq4/int
 /lst
 lst
 str name=wordhave/str
 int name=freq5/int
 /lst
 /arr
 /lst
 bool name=correctlySpelledfalse/bool
 /lst
 /lst
 /response

 Thanks
 Brendan


 On Tue, Jul 23, 2013 at 3:19 PM, Dyer, James
 james.d...@ingramcontent.comwrote:

  For this query:
 
 
 
 http://localhost:8981/solr/articles/select?indent=trueq=Perfrm%20HVCrows=0
 
  ...do you get anything back in the spellcheck response?  Is it correcting
  the individual words and not giving collations?  Or are you getting no
  individual word suggestions also?
 
  James Dyer
  Ingram Content Group
  (615) 213-4311

Re: Spellcheck field element and collation issues

2013-07-23 Thread Brendan Grainger
Thanks James. That's it! Now:

http://localhost:8981/solr/articles/select?indent=trueq=Perfrm%20HVCrows=0maxCollationTries=0

returns:

lst name=collation
str name=collationQueryperform hvac/str
int name=hits4/int
lst name=misspellingsAndCorrections
str name=perfrmperform/str
str name=hvchvac/str
/lst
/lst
lst name=collation
str name=collationQueryperformed hvac/str
int name=hits4/int
lst name=misspellingsAndCorrections
str name=perfrmperformed/str
str name=hvchvac/str
/lst
/lst

If you have time, I'm still slightly unclear on the field element in the
spellcheck configuration. Maybe I should explain how I think it works:

1. You create a relatively unanalyzed field type (e.g. no stemming)
2. You copy text you want to be used to build the spellcheck index into
that field.
3. Build the spellcheck sidecar index (or noop if using DirectSpellChecker
in which case I assume it still uses the dedicated spellcheck field text
was copied into).

When executing a spellcheck request, solr uses the analyzer specified in
queryAnalyzerFieldType to tokenize the query passed in via the q or
spellcheck.q parameter and this tokenized text is the input the
spellcheckchecking instance.

Does that sound right?

Thanks
Brendan







On Tue, Jul 23, 2013 at 5:15 PM, Dyer, James
james.d...@ingramcontent.comwrote:

 I don't believe you can specify more than 1 field on df (default field).
  What you want, I think, is qf (query fields), which is available only if
 using dismax/edismax.

 http://wiki.apache.org/solr/SearchHandler#df
 http://wiki.apache.org/solr/ExtendedDisMax#qf_.28Query_Fields.29

 James Dyer
 Ingram Content Group
 (615) 213-4311


 -Original Message-
 From: Brendan Grainger [mailto:brendan.grain...@gmail.com]
 Sent: Tuesday, July 23, 2013 3:22 PM
 To: solr-user@lucene.apache.org
 Subject: Re: Spellcheck field element and collation issues

 Hi James,

 If I try:


 http://localhost:8981/solr/articles/select?indent=trueq=Perfrm%20HVCrows=0maxCollationTries=0

 I get the same result:

 response
 lst name=responseHeader
 int name=status0/int
 int name=QTime7/int
 lst name=params
 str name=indenttrue/str
 str name=qPerfrm HVC/str
 str name=maxCollationTries0/str
 str name=rows0/str
 /lst
 /lst
 result name=response numFound=0 start=0/result
 lst name=spellcheck
 lst name=suggestions
 lst name=perfrm
 int name=numFound3/int
 int name=startOffset0/int
 int name=endOffset6/int
 int name=origFreq0/int
 arr name=suggestion
 lst
 str name=wordperform/str
 int name=freq4/int
 /lst
 lst
 str name=wordperformed/str
 int name=freq1/int
 /lst
 lst
 str name=wordperformance/str
 int name=freq3/int
 /lst
 /arr
 /lst
 lst name=hvc
 int name=numFound2/int
 int name=startOffset7/int
 int name=endOffset10/int
 int name=origFreq0/int
 arr name=suggestion
 lst
 str name=wordhvac/str
 int name=freq4/int
 /lst
 lst
 str name=wordhave/str
 int name=freq5/int
 /lst
 /arr
 /lst
 bool name=correctlySpelledfalse/bool
 /lst
 /lst
 /response

 However, you're right that my df field for the /select handler is in fact:

  str name=dfmarkup_texts title_texts/str

 I would note that if I specify the query as follows:


 http://localhost:8981/solr/articles/select?indent=trueq=markup_texts:(Perfrm%20HVC)+OR+title_texts:(Perfrm%20HVC)rows=0maxCollationTries=0

 which is what I thought specifying a df would effectively do, I get
 collation results:

 lst name=collation
 str name=collationQuery
 markup_texts:(perform hvac) OR title_texts:(perform hvac)
 /str
 int name=hits4/int
 lst name=misspellingsAndCorrections
 str name=perfrmperform/str
 str name=hvchvac/str
 str name=perfrmperform/str
 str name=hvchvac/str
 /lst
 /lst
 lst name=collation
 str name=collationQuery
 markup_texts:(perform hvac) OR title_texts:(performed hvac)
 /str
 int name=hits4/int
 lst name=misspellingsAndCorrections
 str name=perfrmperform/str
 str name=hvchvac/str
 str name=perfrmperformed/str
 str name=hvchvac/str
 /lst
 /lst

 I think I'm confused about the relationship between the q parameter and
 what the field and queryAnalyzerFieldType are for in the spellcheck
 component definition, i.e. what is this for:

str name=fieldspellcheck/str

 is it even needed if I've specified how the spelling index terms should
 analyzed with:

str name=queryAnalyzerFieldTypetext_spell/str

 Thanks again
 Brendan





 On Tue, Jul 23, 2013 at 3:58 PM, Dyer, James
 james.d...@ingramcontent.comwrote:

  Try tacking maxCollationTries=0 to the URL and see if the collation
  returns.
 
  If you get a collation, then try the same URL with the collation as the
  q parameter.  Does that get results?
 
  My suspicion here is that you are assuming that markup_texts is the
  default search field for /select but in fact it isn't.
 
  James Dyer
  Ingram Content Group
  (615) 213-4311
 
 
  -Original Message-
  From: Brendan Grainger [mailto:brendan.grain...@gmail.com]
  Sent: Tuesday, July 23, 2013 2:43 PM
  To: solr-user@lucene.apache.org
  Subject: Re: Spellcheck field element

RE: Spellcheck field element and collation issues

2013-07-23 Thread Dyer, James
You've got it.  The only other thing is that spellcheck.q does not analyze 
anything.  The whole purpose of this is to allow you to just send raw keywords 
to be spellchecked.  This is handy if you have a complex q parameter (say, 
you're using local params, etc) and the SpellingQueryConverter cannot handle 
it.  You could write your own Query COnverter but its often just easier to 
strip out the keywords and send them over with spellcheck.q.

James Dyer
Ingram Content Group
(615) 213-4311


-Original Message-
From: Brendan Grainger [mailto:brendan.grain...@gmail.com]
Sent: Tuesday, July 23, 2013 4:41 PM
To: solr-user@lucene.apache.org
Subject: Re: Spellcheck field element and collation issues

Thanks James. That's it! Now:

http://localhost:8981/solr/articles/select?indent=trueq=Perfrm%20HVCrows=0maxCollationTries=0

returns:

lst name=collation
str name=collationQueryperform hvac/str
int name=hits4/int
lst name=misspellingsAndCorrections
str name=perfrmperform/str
str name=hvchvac/str
/lst
/lst
lst name=collation
str name=collationQueryperformed hvac/str
int name=hits4/int
lst name=misspellingsAndCorrections
str name=perfrmperformed/str
str name=hvchvac/str
/lst
/lst

If you have time, I'm still slightly unclear on the field element in the
spellcheck configuration. Maybe I should explain how I think it works:

1. You create a relatively unanalyzed field type (e.g. no stemming)
2. You copy text you want to be used to build the spellcheck index into
that field.
3. Build the spellcheck sidecar index (or noop if using DirectSpellChecker
in which case I assume it still uses the dedicated spellcheck field text
was copied into).

When executing a spellcheck request, solr uses the analyzer specified in
queryAnalyzerFieldType to tokenize the query passed in via the q or
spellcheck.q parameter and this tokenized text is the input the
spellcheckchecking instance.

Does that sound right?

Thanks
Brendan







On Tue, Jul 23, 2013 at 5:15 PM, Dyer, James
james.d...@ingramcontent.comwrote:

 I don't believe you can specify more than 1 field on df (default field).
  What you want, I think, is qf (query fields), which is available only if
 using dismax/edismax.

 http://wiki.apache.org/solr/SearchHandler#df
 http://wiki.apache.org/solr/ExtendedDisMax#qf_.28Query_Fields.29

 James Dyer
 Ingram Content Group
 (615) 213-4311


 -Original Message-
 From: Brendan Grainger [mailto:brendan.grain...@gmail.com]
 Sent: Tuesday, July 23, 2013 3:22 PM
 To: solr-user@lucene.apache.org
 Subject: Re: Spellcheck field element and collation issues

 Hi James,

 If I try:


 http://localhost:8981/solr/articles/select?indent=trueq=Perfrm%20HVCrows=0maxCollationTries=0

 I get the same result:

 response
 lst name=responseHeader
 int name=status0/int
 int name=QTime7/int
 lst name=params
 str name=indenttrue/str
 str name=qPerfrm HVC/str
 str name=maxCollationTries0/str
 str name=rows0/str
 /lst
 /lst
 result name=response numFound=0 start=0/result
 lst name=spellcheck
 lst name=suggestions
 lst name=perfrm
 int name=numFound3/int
 int name=startOffset0/int
 int name=endOffset6/int
 int name=origFreq0/int
 arr name=suggestion
 lst
 str name=wordperform/str
 int name=freq4/int
 /lst
 lst
 str name=wordperformed/str
 int name=freq1/int
 /lst
 lst
 str name=wordperformance/str
 int name=freq3/int
 /lst
 /arr
 /lst
 lst name=hvc
 int name=numFound2/int
 int name=startOffset7/int
 int name=endOffset10/int
 int name=origFreq0/int
 arr name=suggestion
 lst
 str name=wordhvac/str
 int name=freq4/int
 /lst
 lst
 str name=wordhave/str
 int name=freq5/int
 /lst
 /arr
 /lst
 bool name=correctlySpelledfalse/bool
 /lst
 /lst
 /response

 However, you're right that my df field for the /select handler is in fact:

  str name=dfmarkup_texts title_texts/str

 I would note that if I specify the query as follows:


 http://localhost:8981/solr/articles/select?indent=trueq=markup_texts:(Perfrm%20HVC)+OR+title_texts:(Perfrm%20HVC)rows=0maxCollationTries=0

 which is what I thought specifying a df would effectively do, I get
 collation results:

 lst name=collation
 str name=collationQuery
 markup_texts:(perform hvac) OR title_texts:(perform hvac)
 /str
 int name=hits4/int
 lst name=misspellingsAndCorrections
 str name=perfrmperform/str
 str name=hvchvac/str
 str name=perfrmperform/str
 str name=hvchvac/str
 /lst
 /lst
 lst name=collation
 str name=collationQuery
 markup_texts:(perform hvac) OR title_texts:(performed hvac)
 /str
 int name=hits4/int
 lst name=misspellingsAndCorrections
 str name=perfrmperform/str
 str name=hvchvac/str
 str name=perfrmperformed/str
 str name=hvchvac/str
 /lst
 /lst

 I think I'm confused about the relationship between the q parameter and
 what the field and queryAnalyzerFieldType are for in the spellcheck
 component definition, i.e. what is this for:

str name=fieldspellcheck/str

 is it even needed if I've specified how the spelling index terms should
 analyzed with:

str name

Re: Spellcheck field element and collation issues

2013-07-23 Thread Brendan Grainger
Perfect thanks so much. You just cleared up the other little bit, i.e. when
the SpellingQueryConverter is used/not used and why you might implement
your own.

Thanks again.


On Tue, Jul 23, 2013 at 6:48 PM, Dyer, James
james.d...@ingramcontent.comwrote:

 You've got it.  The only other thing is that spellcheck.q does not
 analyze anything.  The whole purpose of this is to allow you to just send
 raw keywords to be spellchecked.  This is handy if you have a complex q
 parameter (say, you're using local params, etc) and the
 SpellingQueryConverter cannot handle it.  You could write your own Query
 COnverter but its often just easier to strip out the keywords and send them
 over with spellcheck.q.

 James Dyer
 Ingram Content Group
 (615) 213-4311


 -Original Message-
 From: Brendan Grainger [mailto:brendan.grain...@gmail.com]
 Sent: Tuesday, July 23, 2013 4:41 PM
 To: solr-user@lucene.apache.org
 Subject: Re: Spellcheck field element and collation issues

 Thanks James. That's it! Now:


 http://localhost:8981/solr/articles/select?indent=trueq=Perfrm%20HVCrows=0maxCollationTries=0

 returns:

 lst name=collation
 str name=collationQueryperform hvac/str
 int name=hits4/int
 lst name=misspellingsAndCorrections
 str name=perfrmperform/str
 str name=hvchvac/str
 /lst
 /lst
 lst name=collation
 str name=collationQueryperformed hvac/str
 int name=hits4/int
 lst name=misspellingsAndCorrections
 str name=perfrmperformed/str
 str name=hvchvac/str
 /lst
 /lst

 If you have time, I'm still slightly unclear on the field element in the
 spellcheck configuration. Maybe I should explain how I think it works:

 1. You create a relatively unanalyzed field type (e.g. no stemming)
 2. You copy text you want to be used to build the spellcheck index into
 that field.
 3. Build the spellcheck sidecar index (or noop if using DirectSpellChecker
 in which case I assume it still uses the dedicated spellcheck field text
 was copied into).

 When executing a spellcheck request, solr uses the analyzer specified in
 queryAnalyzerFieldType to tokenize the query passed in via the q or
 spellcheck.q parameter and this tokenized text is the input the
 spellcheckchecking instance.

 Does that sound right?

 Thanks
 Brendan







 On Tue, Jul 23, 2013 at 5:15 PM, Dyer, James
 james.d...@ingramcontent.comwrote:

  I don't believe you can specify more than 1 field on df (default
 field).
   What you want, I think, is qf (query fields), which is available only
 if
  using dismax/edismax.
 
  http://wiki.apache.org/solr/SearchHandler#df
  http://wiki.apache.org/solr/ExtendedDisMax#qf_.28Query_Fields.29
 
  James Dyer
  Ingram Content Group
  (615) 213-4311
 
 
  -Original Message-
  From: Brendan Grainger [mailto:brendan.grain...@gmail.com]
  Sent: Tuesday, July 23, 2013 3:22 PM
  To: solr-user@lucene.apache.org
  Subject: Re: Spellcheck field element and collation issues
 
  Hi James,
 
  If I try:
 
 
 
 http://localhost:8981/solr/articles/select?indent=trueq=Perfrm%20HVCrows=0maxCollationTries=0
 
  I get the same result:
 
  response
  lst name=responseHeader
  int name=status0/int
  int name=QTime7/int
  lst name=params
  str name=indenttrue/str
  str name=qPerfrm HVC/str
  str name=maxCollationTries0/str
  str name=rows0/str
  /lst
  /lst
  result name=response numFound=0 start=0/result
  lst name=spellcheck
  lst name=suggestions
  lst name=perfrm
  int name=numFound3/int
  int name=startOffset0/int
  int name=endOffset6/int
  int name=origFreq0/int
  arr name=suggestion
  lst
  str name=wordperform/str
  int name=freq4/int
  /lst
  lst
  str name=wordperformed/str
  int name=freq1/int
  /lst
  lst
  str name=wordperformance/str
  int name=freq3/int
  /lst
  /arr
  /lst
  lst name=hvc
  int name=numFound2/int
  int name=startOffset7/int
  int name=endOffset10/int
  int name=origFreq0/int
  arr name=suggestion
  lst
  str name=wordhvac/str
  int name=freq4/int
  /lst
  lst
  str name=wordhave/str
  int name=freq5/int
  /lst
  /arr
  /lst
  bool name=correctlySpelledfalse/bool
  /lst
  /lst
  /response
 
  However, you're right that my df field for the /select handler is in
 fact:
 
   str name=dfmarkup_texts title_texts/str
 
  I would note that if I specify the query as follows:
 
 
 
 http://localhost:8981/solr/articles/select?indent=trueq=markup_texts:(Perfrm%20HVC)+OR+title_texts:(Perfrm%20HVC)rows=0maxCollationTries=0
 
  which is what I thought specifying a df would effectively do, I get
  collation results:
 
  lst name=collation
  str name=collationQuery
  markup_texts:(perform hvac) OR title_texts:(perform hvac)
  /str
  int name=hits4/int
  lst name=misspellingsAndCorrections
  str name=perfrmperform/str
  str name=hvchvac/str
  str name=perfrmperform/str
  str name=hvchvac/str
  /lst
  /lst
  lst name=collation
  str name=collationQuery
  markup_texts:(perform hvac) OR title_texts:(performed hvac)
  /str
  int name=hits4/int
  lst name=misspellingsAndCorrections
  str name=perfrmperform/str
  str name

Re: Spellcheck questions

2013-07-18 Thread SolrLover
check the below link to get more info on IndexBasedSpellCheckers

http://searchhub.org/2010/08/31/getting-started-spell-checking-with-apache-lucene-and-solr/



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


Re: spellcheck

2013-05-08 Thread hacene
try to remove those in the configuration




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


Re: spellcheck: change in behavior and QTime

2013-04-23 Thread SandeepM
I apologize for the length of the previous message.

I do see a problem with spellcheck becoming faster (notice QTime).  I also
see an increase in the number of cache hits if spellcheck=false is run one
time followed by the original spellcheck query.  Seems like spellcheck=false
alters the behavior of spellcheck. 

http://host/solr/select?spellcheck=truespellcheck.q=cucoo's+nestdf=spell 
http://host/solr/select?spellcheck=falsespellcheck.q=cucoo's+nestdf=spell  
http://host/solr/select?spellcheck=truespellcheck.q=cucoo's+nestdf=spell 
--- see a faster response and increase in the number of query cache hits.

Thanks.
-- Sandeep





--
View this message in context: 
http://lucene.472066.n3.nabble.com/spellcheck-change-in-behavior-and-QTime-tp4058014p4058402.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: SpellCheck - Ignore list of words

2013-02-18 Thread Erick Erickson
The 4.x based spellcheck process just looks in the index and enumerates the
terms, there's no special sidecar index. So you'd probably have to create
a different field that contained only the words you wanted to be returned
as possibilities

Best
Erick


On Mon, Feb 18, 2013 at 5:06 AM, Hemant Verma hemantverm...@gmail.comwrote:

 Hi All

 I have a use case where I have a list of words, on which I don't want to
 perform spellcheck.
 Like stemming ignores the words listed in protwords.txt file.
 Any idea, how it can be solved?

 Thanks
 Hemant



 --
 View this message in context:
 http://lucene.472066.n3.nabble.com/SpellCheck-Ignore-list-of-words-tp4041099.html
 Sent from the Solr - User mailing list archive at Nabble.com.



Re: SpellCheck - Ignore list of words

2013-02-18 Thread Jack Krupansky

1. Create a copy of the field and add the exception list to it.

2. Or, add a second spell checker to your spellcheck search component that 
is a FileBasedSpellChecker with the exceptions in a simple text file. Then 
reference both spellcheckers with spellcheck.dictionary, with the 
FileBasedSpellChecker as the first.


-- Jack Krupansky

-Original Message- 
From: Hemant Verma

Sent: Monday, February 18, 2013 2:06 AM
To: solr-user@lucene.apache.org
Subject: SpellCheck - Ignore list of words

Hi All

I have a use case where I have a list of words, on which I don't want to
perform spellcheck.
Like stemming ignores the words listed in protwords.txt file.
Any idea, how it can be solved?

Thanks
Hemant



--
View this message in context: 
http://lucene.472066.n3.nabble.com/SpellCheck-Ignore-list-of-words-tp4041099.html
Sent from the Solr - User mailing list archive at Nabble.com. 



Re: SpellCheck Component does not work for certain words

2012-08-22 Thread mechravi25
Hi,

Just few things to add up, I found that when we search for less than or
equal to 3 letters I'm not able to get any suggestions and also when I
search for finding, I dont get any suggestions related to it even though i
have search results regarding the same.

But when i Search for findingg i get suggestions for it and one of the
suggestions is finding and in this case the search results are zero.

Can you tell me if this is the way the spell check is intended to work or am
I going wrong some where?

Thanks



--
View this message in context: 
http://lucene.472066.n3.nabble.com/SpellCheck-Component-does-not-work-for-certain-words-tp4002573p4002636.html
Sent from the Solr - User mailing list archive at Nabble.com.


RE: spellcheck collate with fq parameters SOLR-2010

2012-05-31 Thread Dyer, James
Markus,

When you set spellcheck.maxCollationTries to a value greater than zero, the 
spellchecker will query each collation candidate to determine how many hits it 
would return.  If the collation will not yield any hits, it throws it away then 
tries some more (up to whatever value you set).  You can verify the correctness 
of this by setting spellcheck.maxCollationTries to zero (no checking) and 
then re-trying the collation(s) it suggests by hand (with the same fq params, 
etc).

James Dyer
E-Commerce Systems
Ingram Content Group
(615) 213-4311

-Original Message-
From: Markus Jelsma [mailto:markus.jel...@openindex.io] 
Sent: Thursday, May 31, 2012 8:45 AM
To: solr-user@lucene.apache.org
Subject: spellcheck collate with fq parameters SOLR-2010

Hi,

It seems it doesn't work or i cannot get it to work. I've tried both the 
IndexSpellchecker in Solr 3.2 and the DirectSpellchecker of trunk. The 
correctly spelled flag is correct when considering the fq parameters but the 
collation is never when using a filter. I've also tried 
spellcheck.maxCollationTries on trunk but any value higher than 0 (even very 
high) makes the collation element to disappear. Are there any (open) issues 
that i'm not aware of?

Thanks,
Markus


RE: spellcheck collate with fq parameters SOLR-2010

2012-05-31 Thread Markus Jelsma
Thanks James, that works nicely!
 
 
-Original message-
 From:Dyer, James james.d...@ingrambook.com
 Sent: Thu 31-May-2012 16:05
 To: solr-user@lucene.apache.org
 Subject: RE: spellcheck collate with fq parameters SOLR-2010
 
 Markus,
 
 When you set spellcheck.maxCollationTries to a value greater than zero, the 
 spellchecker will query each collation candidate to determine how many hits 
 it would return.  If the collation will not yield any hits, it throws it away 
 then tries some more (up to whatever value you set).  You can verify the 
 correctness of this by setting spellcheck.maxCollationTries to zero (no 
 checking) and then re-trying the collation(s) it suggests by hand (with the 
 same fq params, etc).
 
 James Dyer
 E-Commerce Systems
 Ingram Content Group
 (615) 213-4311
 
 -Original Message-
 From: Markus Jelsma [mailto:markus.jel...@openindex.io] 
 Sent: Thursday, May 31, 2012 8:45 AM
 To: solr-user@lucene.apache.org
 Subject: spellcheck collate with fq parameters SOLR-2010
 
 Hi,
 
 It seems it doesn't work or i cannot get it to work. I've tried both the 
 IndexSpellchecker in Solr 3.2 and the DirectSpellchecker of trunk. The 
 correctly spelled flag is correct when considering the fq parameters but the 
 collation is never when using a filter. I've also tried 
 spellcheck.maxCollationTries on trunk but any value higher than 0 (even very 
 high) makes the collation element to disappear. Are there any (open) issues 
 that i'm not aware of?
 
 Thanks,
 Markus
 


RE: spellcheck on multiple fields?

2012-05-20 Thread ilanh
It is possible to do spellcheck on multiple fields in Apache's solr index. 
In order to configure Solr spellcheck to use words from several fields you
should:
ol
 li Declare a new field. Dont forget t specify the properties:
type=textSpell and multiValued=true. For example: 
field name=MyField type=textSpell indexed=true
multiValued=true/./li
 li Use copyField to get multiple fields in the field you use for spell
checking. For example: 
copyField source=firstField dest=MyField/ 
copyField source=secondField dest=MyField/./li
 li Configure Solr to use the new field. Do it by set the field name to
use your spellcheck field name. For example: str
name=fieldMyField/str./li
/ol 
For more and detailed information visit 
http://www.rndblog.com/solr-spellcheck-compound-from-several-fields/ Solr
spellcheck compound from several fields 


--
View this message in context: 
http://lucene.472066.n3.nabble.com/spellcheck-on-multiple-fields-tp1587327p3984955.html
Sent from the Solr - User mailing list archive at Nabble.com.


RE: spellcheck configuration not providing suggestions or corrections

2012-02-13 Thread Dyer, James
The one thing that jumps out is you have spellcheck.count set to 1.  Try 10 
and see if you get results.  The spellcherker uses a 2-pass algorithm and if 
the count is too small, all the good suggestions can get eliminated in the 
first pass.  So you often need a count of maybe 10 even if you only want 1 
suggestion.

James Dyer
E-Commerce Systems
Ingram Content Group
(615) 213-4311


-Original Message-
From: geeky2 [mailto:gee...@hotmail.com] 
Sent: Monday, February 13, 2012 11:08 AM
To: solr-user@lucene.apache.org
Subject: spellcheck configuration not providing suggestions or corrections



Hello,

environment: solr 3.5 and centOS

i have reviewed the wiki for http://wiki.apache.org/solr/SpellCheckComponent
and

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

i read the related material in the solr book (smiley).

after doing the configuration in schema.xml and solrconfig.xml - i am NOT
able to get the spellchecker to provide ANY suggestions on mis-spelled
words. i get zero results and zero suggestions.

example search sent to solr.  in this example - i am issuing a search for
gast in hopes that i will get a suggestion for gasket or at least
something.

http://hfsthssolr1.intra.searshc.com:8180/solrpartscat/core1/select/?q=itemDescSpell%3Agast%0D%0A%0D%0Aversion=2.2start=0rows=10indent=onspellcheck=truespellcheck.build=true



pulled from schema.xml

  fieldType name=textSpell class=solr.TextField
positionIncrementGap=100 stored=false multiValued=true
analyzer type=index
  tokenizer class=solr.StandardTokenizerFactory/
  filter class=solr.LowerCaseFilterFactory/
  filter class=solr.SynonymFilterFactory synonyms=synonyms.txt
ignoreCase=true expand=true/
  filter class=solr.StopFilterFactory ignoreCase=true
words=stopwords.txt/
  filter class=solr.StandardFilterFactory/
  filter class=solr.RemoveDuplicatesTokenFilterFactory/
/analyzer
analyzer type=query
  tokenizer class=solr.StandardTokenizerFactory/
  filter class=solr.LowerCaseFilterFactory/
  filter class=solr.StopFilterFactory ignoreCase=true
words=stopwords.txt/
  filter class=solr.StandardFilterFactory/
  filter class=solr.RemoveDuplicatesTokenFilterFactory/
/analyzer
  /fieldType


field name=itemDescSpell type=textSpell/


  copyField source=itemDesc dest=itemDescSpell/


pulled from solrconfig.xml

  requestHandler name=/search
class=org.apache.solr.handler.component.SearchHandler
lst name=defaults

str name=spellcheck.dictionarydefault/str

str name=spellcheck.onlyMorePopularfalse/str

str name=spellcheck.extendedResultsfalse/str

str name=spellcheck.count1/str
  str name=echoParamsexplicit/str
/lst
arr name=last-components
  strspellcheck/str
/arr
  /requestHandler

  searchComponent name=spellcheck class=solr.SpellCheckComponent

str name=queryAnalyzerFieldTypetextSpell/str




lst name=spellchecker
  str name=namedefault/str
  str name=fielditemDescSpell/str
  str name=buildOnOptimizetrue/str
  str name=spellcheckIndexDirspellchecker_mark/str
  
/lst









  /searchComponent




any help or suggestions would be appreciated,
mark




--
View this message in context: 
http://lucene.472066.n3.nabble.com/spellcheck-configuration-not-providing-suggestions-or-corrections-tp3740877p3740877.html
Sent from the Solr - User mailing list archive at Nabble.com.


RE: spellcheck configuration not providing suggestions or corrections

2012-02-13 Thread geeky2
hello 

thank you for the suggestion - however this did not work.

i went in to solrconfig and change the count to 20 - then restarted the
server and then did a reimport.



is it possible that i am not firing the request handler that i think i am
firing ?


  requestHandler name=/search
class=org.apache.solr.handler.component.SearchHandler
lst name=defaults

str name=spellcheck.dictionarydefault/str

str name=spellcheck.onlyMorePopularfalse/str

str name=spellcheck.extendedResultstrue/str

str name=spellcheck.count20/str
  str name=echoParamsexplicit/str
/lst
arr name=last-components
  strspellcheck/str
/arr
  /requestHandler


query sent to server:

http://hfsthssolr1.intra.searshc.com:8180/solrpartscat/core1/select/?q=itemDescSpell%3Agusket%0D%0Aversion=2.2start=0rows=10indent=onspellcheck=truespellcheck.build=true

results:

responselst name=responseHeaderint name=status0/intint
name=QTime0/intlst name=paramsstr name=spellchecktrue/strstr
name=indenton/strstr name=start0/strstr
name=qitemDescSpell:gusket
/strstr name=spellcheck.buildtrue/strstr name=rows10/strstr
name=version2.2/str/lst/lstresult name=response numFound=0
start=0//response

--
View this message in context: 
http://lucene.472066.n3.nabble.com/spellcheck-configuration-not-providing-suggestions-or-corrections-tp3740877p3741521.html
Sent from the Solr - User mailing list archive at Nabble.com.


RE: spellcheck configuration not providing suggestions or corrections

2012-02-13 Thread Dyer, James
That would be it, I tbinkl.  Your request is to /select, but you've put 
spellchecking into /search.  Try /search instead.  Also, I doubt its the 
problem, but try removing the trailing CRLFs from your query.  Also, typically 
you'd still query against the main field (itemDesc in your case) and just use 
itemDescSpell from which to build your dictionary.

James Dyer
E-Commerce Systems
Ingram Content Group
(615) 213-4311


-Original Message-
From: geeky2 [mailto:gee...@hotmail.com] 
Sent: Monday, February 13, 2012 2:28 PM
To: solr-user@lucene.apache.org
Subject: RE: spellcheck configuration not providing suggestions or corrections

hello 

thank you for the suggestion - however this did not work.

i went in to solrconfig and change the count to 20 - then restarted the
server and then did a reimport.



is it possible that i am not firing the request handler that i think i am
firing ?


  requestHandler name=/search
class=org.apache.solr.handler.component.SearchHandler
lst name=defaults

str name=spellcheck.dictionarydefault/str

str name=spellcheck.onlyMorePopularfalse/str

str name=spellcheck.extendedResultstrue/str

str name=spellcheck.count20/str
  str name=echoParamsexplicit/str
/lst
arr name=last-components
  strspellcheck/str
/arr
  /requestHandler


query sent to server:

http://hfsthssolr1.intra.searshc.com:8180/solrpartscat/core1/select/?q=itemDescSpell%3Agusket%0D%0Aversion=2.2start=0rows=10indent=onspellcheck=truespellcheck.build=true

results:

responselst name=responseHeaderint name=status0/intint
name=QTime0/intlst name=paramsstr name=spellchecktrue/strstr
name=indenton/strstr name=start0/strstr
name=qitemDescSpell:gusket
/strstr name=spellcheck.buildtrue/strstr name=rows10/strstr
name=version2.2/str/lst/lstresult name=response numFound=0
start=0//response

--
View this message in context: 
http://lucene.472066.n3.nabble.com/spellcheck-configuration-not-providing-suggestions-or-corrections-tp3740877p3741521.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: spellcheck configuration not providing suggestions or corrections

2012-02-13 Thread alxsss
you have put this

 str name=buildOnOptimizetrue/str

Maybe you need to put 
str name=buildOnCommittrue/str

 

 Alex.

 

-Original Message-
From: Dyer, James james.d...@ingrambook.com 
To: solr-user solr-user@lucene.apache.org
Sent: Mon, Feb 13, 2012 12:43 pm
Subject: RE: spellcheck configuration not providing suggestions or corrections


That would be it, I tbinkl.  Your request is to /select, but you've put 
spellchecking into /search.  Try /search instead.  Also, I doubt its the 
problem, but try removing the trailing CRLFs from your query.  Also, typically 
you'd still query against the main field (itemDesc in your case) and just use 
itemDescSpell from which to build your dictionary.

James Dyer
E-Commerce Systems
Ingram Content Group
(615) 213-4311


-Original Message-
From: geeky2 [mailto:gee...@hotmail.com] 
Sent: Monday, February 13, 2012 2:28 PM
To: solr-user@lucene.apache.org
Subject: RE: spellcheck configuration not providing suggestions or corrections

hello 

thank you for the suggestion - however this did not work.

i went in to solrconfig and change the count to 20 - then restarted the
server and then did a reimport.



is it possible that i am not firing the request handler that i think i am
firing ?


  requestHandler name=/search
class=org.apache.solr.handler.component.SearchHandler
lst name=defaults

str name=spellcheck.dictionarydefault/str

str name=spellcheck.onlyMorePopularfalse/str

str name=spellcheck.extendedResultstrue/str

str name=spellcheck.count20/str
  str name=echoParamsexplicit/str
/lst
arr name=last-components
  strspellcheck/str
/arr
  /requestHandler


query sent to server:

http://hfsthssolr1.intra.searshc.com:8180/solrpartscat/core1/select/?q=itemDescSpell%3Agusket%0D%0Aversion=2.2start=0rows=10indent=onspellcheck=truespellcheck.build=true

results:

responselst name=responseHeaderint name=status0/intint
name=QTime0/intlst name=paramsstr name=spellchecktrue/strstr
name=indenton/strstr name=start0/strstr
name=qitemDescSpell:gusket
/strstr name=spellcheck.buildtrue/strstr name=rows10/strstr
name=version2.2/str/lst/lstresult name=response numFound=0
start=0//response

--
View this message in context: 
http://lucene.472066.n3.nabble.com/spellcheck-configuration-not-providing-suggestions-or-corrections-tp3740877p3741521.html
Sent from the Solr - User mailing list archive at Nabble.com.

 


RE: spellcheck configuration not providing suggestions or corrections

2012-02-13 Thread geeky2
thank you sooo much - that was it.

also - thank you for the tip on which field to hit, eg itemDesc in stead of
itemDescSpell.

thank you,
mark



--
View this message in context: 
http://lucene.472066.n3.nabble.com/spellcheck-configuration-not-providing-suggestions-or-corrections-tp3740877p3741783.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: SpellCheck Help

2012-01-26 Thread vishal_asc
Downloaded Apache Solr from the URL: http://apache.dattatec.com//lucene/solr/
, 
 extracted it at my windows machine.

Then started solr:  [solr-path]/example, and typed the following in a
terminal: java –jar start.jar.
it started and i can see the solr page at http://localhost:8983/solr/admin/

Now copied Magento [magento-instance-root]/lib/Apache/Solr/conf to
[Solr-instance-root]/example/solr/conf.

then again restared solr lots of activity was going on their. then I run
System-index management and at front end search box i tried to search a
product with incorrect spelling, in solr console i can see some activity but
at magento front end I couldnt get any result, why ?

I followed the steps given at this URL:
http://www.summasolutions.net/blogposts/magento-apache-solr-set#comment-615

Please look into it and let me know any other information you require.

I also want to know how i can implement facet and highlight search with
resulted output.


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


Re: SpellCheck Help

2012-01-26 Thread David Radunz

Hey,

I really recommend you contact Magento pre-sales to find out why 
THEIR stuff doesn't work. The information you have provided is specific 
to magento... You can't expect people on a Solr mailing list to help you 
with a Magento problem. I guarantee you the issue is probably something 
Magento is doing, so try seeking support their first (Try their mailing 
lists if they have any, or on IRC: irc.freenode.org #magento).


I am not trying to be rude, rather to save you time and others effort.

Cheers,

David

On 27/01/2012 5:37 PM, vishal_asc wrote:

Downloaded Apache Solr from the URL: http://apache.dattatec.com//lucene/solr/
,
  extracted it at my windows machine.

Then started solr:  [solr-path]/example, and typed the following in a
terminal: java –jar start.jar.
it started and i can see the solr page at http://localhost:8983/solr/admin/

Now copied Magento [magento-instance-root]/lib/Apache/Solr/conf to
[Solr-instance-root]/example/solr/conf.

then again restared solr lots of activity was going on their. then I run
System-index management and at front end search box i tried to search a
product with incorrect spelling, in solr console i can see some activity but
at magento front end I couldnt get any result, why ?

I followed the steps given at this URL:
http://www.summasolutions.net/blogposts/magento-apache-solr-set#comment-615

Please look into it and let me know any other information you require.

I also want to know how i can implement facet and highlight search with
resulted output.


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




Re: SpellCheck Help

2012-01-25 Thread Erick Erickson
You have to give us a lot more detail about exactly
what you've done and what your results are. Please review:
http://wiki.apache.org/solr/UsingMailingLists

Best
Erick

On Tue, Jan 24, 2012 at 7:42 PM, vishal_asc vishal.por...@ascendum.com wrote:
 I have installed the same solr 3.5 with jetty and integrating it magento 1.11
 but it seems to be not working.
 As my search result is not showing Did you mean string ? when I misspelled
 any word.

 I followed all steps necessary for magento solr integration.

 Please help ASAP.

 Thanks
 Vishal

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


Re: SpellCheck Help

2012-01-24 Thread vishal_asc
I have installed the same solr 3.5 with jetty and integrating it magento 1.11
but it seems to be not working. 
As my search result is not showing Did you mean string ? when I misspelled
any word.

I followed all steps necessary for magento solr integration.

Please help ASAP.

Thanks
Vishal

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


RE: SpellCheck Help

2012-01-10 Thread Dyer, James
Three things to check:

1. Use a higher spellcheck.count than 1.   Try 10.  IndexBasedSpellChecker 
pre-filters the possibilities in a first pass of a 2-pass process.  If 
spellcheck.count is too low, all the good suggestions might get filtered on the 
first pass and then it won't find anything on the second.

2. Be sure you're building the dictionary.  Try adding spellcheck.build=true 
to your first query.  You need to do do this every time you start the solr core.

3. Try a lower spellcheck.accuracy.  Maybe the default .5 instead of the .7 
you've got.

One other thing to consider:

- If the misspelled word exists in your index, the spellchecker won't try to 
correct it.  This is true even if you're omitting words from the dictionary 
(for intance, by using thresholdTokenFrequency)

James Dyer
E-Commerce Systems
Ingram Content Group
(615) 213-4311


-Original Message-
From: Donald Organ [mailto:dor...@donaldorgan.com] 
Sent: Tuesday, January 10, 2012 1:26 PM
To: solr-user@lucene.apache.org
Subject: SpellCheck Help

I am trying to get the IndexBasedSpellChecker to work.  I believe I have
everything setup properly and the spellcheck component seems to be running
but the suggestions list is empty.

I am using SOLR 3.5 with Jetty.

My solrconfig.xml and schema.xml are as follows:

solrconfig.xml:  http://pastie.org/private/z7sharm0ajlmm9hpy41v7g
schema.xml: http://pastie.org/private/ykim99unbqfhumxxzbs6g


Re: SpellCheck Help

2012-01-10 Thread Donald Organ
my copyField was defined as copyfield   --- notice the lowercase f




On Tue, Jan 10, 2012 at 2:50 PM, Dyer, James james.d...@ingrambook.comwrote:

 Three things to check:

 1. Use a higher spellcheck.count than 1.   Try 10.  IndexBasedSpellChecker
 pre-filters the possibilities in a first pass of a 2-pass process.  If
 spellcheck.count is too low, all the good suggestions might get filtered on
 the first pass and then it won't find anything on the second.

 2. Be sure you're building the dictionary.  Try adding
 spellcheck.build=true to your first query.  You need to do do this every
 time you start the solr core.

 3. Try a lower spellcheck.accuracy.  Maybe the default .5 instead of the
 .7 you've got.

 One other thing to consider:

 - If the misspelled word exists in your index, the spellchecker won't
 try to correct it.  This is true even if you're omitting words from the
 dictionary (for intance, by using thresholdTokenFrequency)

 James Dyer
 E-Commerce Systems
 Ingram Content Group
 (615) 213-4311


 -Original Message-
 From: Donald Organ [mailto:dor...@donaldorgan.com]
 Sent: Tuesday, January 10, 2012 1:26 PM
 To: solr-user@lucene.apache.org
 Subject: SpellCheck Help

 I am trying to get the IndexBasedSpellChecker to work.  I believe I have
 everything setup properly and the spellcheck component seems to be running
 but the suggestions list is empty.

 I am using SOLR 3.5 with Jetty.

 My solrconfig.xml and schema.xml are as follows:

 solrconfig.xml:  http://pastie.org/private/z7sharm0ajlmm9hpy41v7g
 schema.xml: http://pastie.org/private/ykim99unbqfhumxxzbs6g



Re: spellcheck-index is rebuilt on commit

2012-01-03 Thread OliverS
Hi all

Thanks a lot, and it seems to be a bug, but not of 4.0 only. You are right,
I was doing a commit on an optimized index without adding any new docs (in
fact, I did this for replication on the master). I will open a ticket as
soon as I fully understand what's going on. I have difficulties
understanding Simons answer:
* building the spellcheck-index is triggered by a new searcher?
* why would this not happen after post/commit?

Thanks
Oliver

--
View this message in context: 
http://lucene.472066.n3.nabble.com/spellcheck-index-is-rebuilt-on-commit-tp3626492p3628423.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: spellcheck-index is rebuilt on commit

2012-01-03 Thread Simon Willnauer
On Tue, Jan 3, 2012 at 9:12 AM, OliverS oliver.schi...@unibas.ch wrote:
 Hi all

 Thanks a lot, and it seems to be a bug, but not of 4.0 only. You are right,
 I was doing a commit on an optimized index without adding any new docs (in
 fact, I did this for replication on the master). I will open a ticket as
 soon as I fully understand what's going on. I have difficulties
 understanding Simons answer:
 * building the spellcheck-index is triggered by a new searcher?
 * why would this not happen after post/commit?

a commit in solr forces a new searcher to be opened. this new searcher
is passed to the spellcheckers listener which reopens / rebuilds the
spellcheck index. Yet, if you way rebuildOnOptimize=true it only
checks if the index has a single segment. since you didn't change
anything since this was last checked it still has one segment. The
problem is that the listener doesn't safe any state or the version of
the index since it was last called and assumes the index was just
optimized.

simon

 Thanks
 Oliver

 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/spellcheck-index-is-rebuilt-on-commit-tp3626492p3628423.html
 Sent from the Solr - User mailing list archive at Nabble.com.


Re: spellcheck-index is rebuilt on commit

2012-01-03 Thread OliverS
Thanks for the clear explanation. I'll open a ticket as soon as jira is up
running again.

Oliver

--
View this message in context: 
http://lucene.472066.n3.nabble.com/spellcheck-index-is-rebuilt-on-commit-tp3626492p3628603.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: spellcheck-index is rebuilt on commit

2012-01-03 Thread OliverS
A jira-ticket has been issued, this discussion here is closed.
https://issues.apache.org/jira/browse/SOLR-2999

Oliver

--
View this message in context: 
http://lucene.472066.n3.nabble.com/spellcheck-index-is-rebuilt-on-commit-tp3626492p3628894.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: spellcheck-index is rebuilt on commit

2012-01-02 Thread Jan Høydahl
Olivier, your log snippets did not make it into the mail. I think the mailing 
list strips attachments.

Did you reload core or restart Jetty/Tomcat after your changes?

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com
Solr Training - www.solrtraining.com

On 2. jan. 2012, at 13:48, Oliver Schihin wrote:

 Hello
 
 We are working with solr 4.0, the spellchecker used is still the classic
 IndexBasedSpellChecker. Now every time I do a commit, it rebuilds the
 spellchecker index, even though I clearly state a build on optimize. The
 configuration in solrconfig looks like this:
 
 
 I call commits testwise through curl
 
 
 This is from the log:
 
 
 Where am I wrong, any suggestions? Thanks for help
 Oliver
 
 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/spellcheck-index-is-rebuilt-on-commit-tp3626492p3626492.html
 Sent from the Solr - User mailing list archive at Nabble.com.



Re: spellcheck-index is rebuilt on commit

2012-01-02 Thread OliverS
Hi

Looks like they strip the raw-Text for the list. Whole message here:
http://lucene.472066.n3.nabble.com/spellcheck-index-is-rebuilt-on-commit-td3626492.html

Yes, I did restart tomcat.

Thanks
Oliver

Zitat von Jan Høydahl / Cominvent [via Lucene]  
ml-node+s472066n3627105...@n3.nabble.com:



 Olivier, your log snippets did not make it into the mail. I think  
 the mailing list strips attachments.

 Did you reload core or restart Jetty/Tomcat after your changes?

 --
 Jan Høydahl, search solution architect
 Cominvent AS - www.cominvent.com
 Solr Training - www.solrtraining.com

 On 2. jan. 2012, at 13:48, Oliver Schihin wrote:

 Hello

 We are working with solr 4.0, the spellchecker used is still the classic
 IndexBasedSpellChecker. Now every time I do a commit, it rebuilds the
 spellchecker index, even though I clearly state a build on optimize. The
 configuration in solrconfig looks like this:


 I call commits testwise through curl


 This is from the log:


 Where am I wrong, any suggestions? Thanks for help
 Oliver

 --
 View this message in context:  
 http://lucene.472066.n3.nabble.com/spellcheck-index-is-rebuilt-on-commit-tp3626492p3626492.html
 Sent from the Solr - User mailing list archive at Nabble.com.



 ___
 If you reply to this email, your message will be added to the  
 discussion below:
 http://lucene.472066.n3.nabble.com/spellcheck-index-is-rebuilt-on-commit-tp3626492p3627105.html

 To unsubscribe from spellcheck-index is rebuilt on commit, visit  
 http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3626492code=b2xpdmVyLnNjaGloaW5AdW5pYmFzLmNofDM2MjY0OTJ8LTE5ODUwMDUwMTY=




This message was sent using IMP, the Internet Messaging Program.




--
View this message in context: 
http://lucene.472066.n3.nabble.com/spellcheck-index-is-rebuilt-on-commit-tp3626492p3627383.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: spellcheck-index is rebuilt on commit

2012-01-02 Thread Simon Willnauer
hey, is it possible that during those commits nothing has changed in
the index? I mean are you committing nevertheless there are changes?
if so this could happen since the spellchecker gets a new even that
you did a commit but the index didn't really change. The spellchecker
really only checks if there is a single segment in the index and
rebuilds the index.

if this is the case, I think this is a bug... can you open a jira ticket?

simon

On Mon, Jan 2, 2012 at 8:36 PM, OliverS oliver.schi...@unibas.ch wrote:
 Hi

 Looks like they strip the raw-Text for the list. Whole message here:
 http://lucene.472066.n3.nabble.com/spellcheck-index-is-rebuilt-on-commit-td3626492.html

 Yes, I did restart tomcat.

 Thanks
 Oliver

 Zitat von Jan Høydahl / Cominvent [via Lucene]
 ml-node+s472066n3627105...@n3.nabble.com:



 Olivier, your log snippets did not make it into the mail. I think
 the mailing list strips attachments.

 Did you reload core or restart Jetty/Tomcat after your changes?

 --
 Jan Høydahl, search solution architect
 Cominvent AS - www.cominvent.com
 Solr Training - www.solrtraining.com

 On 2. jan. 2012, at 13:48, Oliver Schihin wrote:

 Hello

 We are working with solr 4.0, the spellchecker used is still the classic
 IndexBasedSpellChecker. Now every time I do a commit, it rebuilds the
 spellchecker index, even though I clearly state a build on optimize. The
 configuration in solrconfig looks like this:


 I call commits testwise through curl


 This is from the log:


 Where am I wrong, any suggestions? Thanks for help
 Oliver

 --
 View this message in context:
 http://lucene.472066.n3.nabble.com/spellcheck-index-is-rebuilt-on-commit-tp3626492p3626492.html
 Sent from the Solr - User mailing list archive at Nabble.com.



 ___
 If you reply to this email, your message will be added to the
 discussion below:
 http://lucene.472066.n3.nabble.com/spellcheck-index-is-rebuilt-on-commit-tp3626492p3627105.html

 To unsubscribe from spellcheck-index is rebuilt on commit, visit
 http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3626492code=b2xpdmVyLnNjaGloaW5AdW5pYmFzLmNofDM2MjY0OTJ8LTE5ODUwMDUwMTY=



 
 This message was sent using IMP, the Internet Messaging Program.




 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/spellcheck-index-is-rebuilt-on-commit-tp3626492p3627383.html
 Sent from the Solr - User mailing list archive at Nabble.com.


Re: spellcheck-index is rebuilt on commit

2012-01-02 Thread Mark Miller
Yeah, the only code path I can see this happening on is:

newSearcher.getIndexReader().getSequentialSubReaders().length == 1

So if you keep issuing commits on an optimized index, it will open a new 
Searcher and keep rebuilding the index.

Really, this should probably *only* trigger on an optimize call - not on every 
commit against a single segment index.


- Mark Miller
lucidimagination.com

On Jan 2, 2012, at 4:22 PM, Simon Willnauer wrote:

 hey, is it possible that during those commits nothing has changed in
 the index? I mean are you committing nevertheless there are changes?
 if so this could happen since the spellchecker gets a new even that
 you did a commit but the index didn't really change. The spellchecker
 really only checks if there is a single segment in the index and
 rebuilds the index.
 
 if this is the case, I think this is a bug... can you open a jira ticket?
 
 simon
 
 On Mon, Jan 2, 2012 at 8:36 PM, OliverS oliver.schi...@unibas.ch wrote:
 Hi
 
 Looks like they strip the raw-Text for the list. Whole message here:
 http://lucene.472066.n3.nabble.com/spellcheck-index-is-rebuilt-on-commit-td3626492.html
 
 Yes, I did restart tomcat.
 
 Thanks
 Oliver
 
 Zitat von Jan Høydahl / Cominvent [via Lucene]
 ml-node+s472066n3627105...@n3.nabble.com:
 
 
 
 Olivier, your log snippets did not make it into the mail. I think
 the mailing list strips attachments.
 
 Did you reload core or restart Jetty/Tomcat after your changes?
 
 --
 Jan Høydahl, search solution architect
 Cominvent AS - www.cominvent.com
 Solr Training - www.solrtraining.com
 
 On 2. jan. 2012, at 13:48, Oliver Schihin wrote:
 
 Hello
 
 We are working with solr 4.0, the spellchecker used is still the classic
 IndexBasedSpellChecker. Now every time I do a commit, it rebuilds the
 spellchecker index, even though I clearly state a build on optimize. The
 configuration in solrconfig looks like this:
 
 
 I call commits testwise through curl
 
 
 This is from the log:
 
 
 Where am I wrong, any suggestions? Thanks for help
 Oliver
 
 --
 View this message in context:
 http://lucene.472066.n3.nabble.com/spellcheck-index-is-rebuilt-on-commit-tp3626492p3626492.html
 Sent from the Solr - User mailing list archive at Nabble.com.
 
 
 
 ___
 If you reply to this email, your message will be added to the
 discussion below:
 http://lucene.472066.n3.nabble.com/spellcheck-index-is-rebuilt-on-commit-tp3626492p3627105.html
 
 To unsubscribe from spellcheck-index is rebuilt on commit, visit
 http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3626492code=b2xpdmVyLnNjaGloaW5AdW5pYmFzLmNofDM2MjY0OTJ8LTE5ODUwMDUwMTY=
 
 
 
 
 This message was sent using IMP, the Internet Messaging Program.
 
 
 
 
 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/spellcheck-index-is-rebuilt-on-commit-tp3626492p3627383.html
 Sent from the Solr - User mailing list archive at Nabble.com.















Re: spellcheck-index is rebuilt on commit

2012-01-02 Thread Jan Høydahl
Reproduced this both on 3.X and trunk using exampledocs.
If you have an optimized index, then reindex ALL docs with a COMMIT, then there 
will be only one segment, probably because all docs in the previous segment 
were deleted. Adding just a few docs and COMMITting does not trigger this case.

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com
Solr Training - www.solrtraining.com

On 2. jan. 2012, at 22:22, Simon Willnauer wrote:

 hey, is it possible that during those commits nothing has changed in
 the index? I mean are you committing nevertheless there are changes?
 if so this could happen since the spellchecker gets a new even that
 you did a commit but the index didn't really change. The spellchecker
 really only checks if there is a single segment in the index and
 rebuilds the index.
 
 if this is the case, I think this is a bug... can you open a jira ticket?
 
 simon
 
 On Mon, Jan 2, 2012 at 8:36 PM, OliverS oliver.schi...@unibas.ch wrote:
 Hi
 
 Looks like they strip the raw-Text for the list. Whole message here:
 http://lucene.472066.n3.nabble.com/spellcheck-index-is-rebuilt-on-commit-td3626492.html
 
 Yes, I did restart tomcat.
 
 Thanks
 Oliver
 
 Zitat von Jan Høydahl / Cominvent [via Lucene]
 ml-node+s472066n3627105...@n3.nabble.com:
 
 
 
 Olivier, your log snippets did not make it into the mail. I think
 the mailing list strips attachments.
 
 Did you reload core or restart Jetty/Tomcat after your changes?
 
 --
 Jan Høydahl, search solution architect
 Cominvent AS - www.cominvent.com
 Solr Training - www.solrtraining.com
 
 On 2. jan. 2012, at 13:48, Oliver Schihin wrote:
 
 Hello
 
 We are working with solr 4.0, the spellchecker used is still the classic
 IndexBasedSpellChecker. Now every time I do a commit, it rebuilds the
 spellchecker index, even though I clearly state a build on optimize. The
 configuration in solrconfig looks like this:
 
 
 I call commits testwise through curl
 
 
 This is from the log:
 
 
 Where am I wrong, any suggestions? Thanks for help
 Oliver
 
 --
 View this message in context:
 http://lucene.472066.n3.nabble.com/spellcheck-index-is-rebuilt-on-commit-tp3626492p3626492.html
 Sent from the Solr - User mailing list archive at Nabble.com.
 
 
 
 ___
 If you reply to this email, your message will be added to the
 discussion below:
 http://lucene.472066.n3.nabble.com/spellcheck-index-is-rebuilt-on-commit-tp3626492p3627105.html
 
 To unsubscribe from spellcheck-index is rebuilt on commit, visit
 http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3626492code=b2xpdmVyLnNjaGloaW5AdW5pYmFzLmNofDM2MjY0OTJ8LTE5ODUwMDUwMTY=
 
 
 
 
 This message was sent using IMP, the Internet Messaging Program.
 
 
 
 
 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/spellcheck-index-is-rebuilt-on-commit-tp3626492p3627383.html
 Sent from the Solr - User mailing list archive at Nabble.com.



Re: spellcheck in dismax

2011-11-22 Thread alxsss

 It seem you forget this
str name=spellchecktrue/str


 

 

-Original Message-
From: Ruixiang Zhang rxzh...@gmail.com
To: solr-user solr-user@lucene.apache.org
Sent: Tue, Nov 22, 2011 11:54 am
Subject: spellcheck in dismax


I put the following into dismax requestHandler, but no suggestion field is
returned.

lst name=defaults
  str name=spellcheck.onlyMorePopulartrue/str
  str name=spellcheck.extendedResultsfalse/str
  str name=spellcheck.count1/str
/lst
arr name=last-components
  strspellcheck/str
/arr

But everything works if I put it as a separate requestHandler. Did I miss
something?

Thanks
Richard

 


RE: SpellCheck Print Multiple Collations

2011-09-22 Thread Dyer, James
If using SolrJ,

use QueryResponse.getSpellCheckResponse().getCollatedResults() .  This returns 
a ListCollation .  On each Collation object, getCollationQueryString() will 
return the corrected queries.  

Note that unless you specify spellcheck.maxCollationTries, the collations 
might not return anything if re-queried.

James Dyer
E-Commerce Systems
Ingram Content Group
(615) 213-4311

-Original Message-
From: Kudzanai [mailto:kudzanai.vudzij...@gmail.com] 
Sent: Thursday, September 22, 2011 6:03 AM
To: solr-user@lucene.apache.org
Subject: SpellCheck Print Multiple Collations

Hi,

This is probably a very basic question but how do I get the returned
collations.

My spell check request is 

http://localhost:8983/solr/autocomplete/select?spellcheck.q=ipood%20toughspellcheck=truespellcheck.collate=truespellcheck.build=truespellcheck.maxCollations=3rows=3spellcheck.count=5

Part of my response is:

str name=collationipod tough/str
str name=collationipad tough/str
str name=collationwood tough/str/lst

My results are accurate but now how do i get the collations. What method do
i use in the API?



--
View this message in context: 
http://lucene.472066.n3.nabble.com/SpellCheck-Print-Multiple-Collations-tp3358391p3358391.html
Sent from the Solr - User mailing list archive at Nabble.com.


RE: SpellCheck Print Multiple Collations

2011-09-22 Thread Kudzanai
I am using solrJ.

Here is what my method looks like.

 ListString suggestedTermsList = new ArrayListString();
if(aQueryResponse == null) {
  return suggestedTermsList;
}

try {
  SpellCheckResponse spellCheckResponse =
aQueryResponse.getSpellCheckResponse();
  if(spellCheckResponse == null) {
throw new Exception(No SpellCheckResponse in QueryResponse);
  }  
  
 ListCollation collationList =
spellCheckResponse.getCollatedResults();
  
  for(Collation c : collationList){
suggestedTermsList.add(c.getCollationQueryString());
  }
  
}catch(Exception e) {
  Trace.Log(SolrSpellCheck,Trace.HIGH, Exception:  +
e.getMessage());
}
return suggestedTermsList;
  }

My response header is like so:

spellcheck={suggestions={ipood={numFound=5,startOffset=0,endOffset=5,suggestion=[ipod,
ipad, wood, food, pod]},collation=ipod tough,collation=ipad
tough,collation=wood tough,collation=food tough}}}


I get 4 collations  [collation=ipod tough,collation=ipad
tough,collation=wood tough,collation=food tough] ,
which I want to add to a List suggestedTermsList which I then return to the
calling code. Right now my ArrayList has 4 collations but it only has the
last collation repeated 4 times. i.e food tough - four times.

spellcheck.maxCollationTries set to 1 causes my QueryResponse to be null.


--
View this message in context: 
http://lucene.472066.n3.nabble.com/SpellCheck-Print-Multiple-Collations-tp3358391p3358930.html
Sent from the Solr - User mailing list archive at Nabble.com.


RE: SpellCheck Print Multiple Collations

2011-09-22 Thread Dyer, James
Try adding spellcheck.collateExtendedResults=true to your query (without 
maxCollationTries) to see if solrj correctly returns all 4 collations in that 
case.  In any case, if solrj is returning the last collation 4 times, this is 
likely a bug.

The likely reason why spellcheck.maxCollationTries=1 results in a null is 
that the first collation it tried didn't result in any hits.  Because you're 
only allowing 1 try it won't attempt to check any alternatives and instead 
returns nothing.  Generally if using this parameter, you'd want to set it at 
least to whatever value you've got for maxCollations, possibly a few higher.

James Dyer
E-Commerce Systems
Ingram Content Group
(615) 213-4311


-Original Message-
From: Kudzanai [mailto:kudzanai.vudzij...@gmail.com] 
Sent: Thursday, September 22, 2011 9:20 AM
To: solr-user@lucene.apache.org
Subject: RE: SpellCheck Print Multiple Collations

I am using solrJ.

Here is what my method looks like.

 ListString suggestedTermsList = new ArrayListString();
if(aQueryResponse == null) {
  return suggestedTermsList;
}

try {
  SpellCheckResponse spellCheckResponse =
aQueryResponse.getSpellCheckResponse();
  if(spellCheckResponse == null) {
throw new Exception(No SpellCheckResponse in QueryResponse);
  }  
  
 ListCollation collationList =
spellCheckResponse.getCollatedResults();
  
  for(Collation c : collationList){
suggestedTermsList.add(c.getCollationQueryString());
  }
  
}catch(Exception e) {
  Trace.Log(SolrSpellCheck,Trace.HIGH, Exception:  +
e.getMessage());
}
return suggestedTermsList;
  }

My response header is like so:

spellcheck={suggestions={ipood={numFound=5,startOffset=0,endOffset=5,suggestion=[ipod,
ipad, wood, food, pod]},collation=ipod tough,collation=ipad
tough,collation=wood tough,collation=food tough}}}


I get 4 collations  [collation=ipod tough,collation=ipad
tough,collation=wood tough,collation=food tough] ,
which I want to add to a List suggestedTermsList which I then return to the
calling code. Right now my ArrayList has 4 collations but it only has the
last collation repeated 4 times. i.e food tough - four times.

spellcheck.maxCollationTries set to 1 causes my QueryResponse to be null.


--
View this message in context: 
http://lucene.472066.n3.nabble.com/SpellCheck-Print-Multiple-Collations-tp3358391p3358930.html
Sent from the Solr - User mailing list archive at Nabble.com.


RE: SpellCheck Print Multiple Collations

2011-09-22 Thread Kudzanai
spellcheck.collateExtendedResults = true seems to have sorted my problem. 

My other parameters are:

spellcheck =  true
spellcheck.count =  aNumResults
spellcheck.q =  SEARCH TEXT
spellcheck.build=  true
spellcheck.collate=  true
spellcheck.maxCollations= 4
spellcheck.collateExtendedResults = true
suggestionCount = 5;
rows = 0


It seems to work perfectly now. Thanks a lot.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/SpellCheck-Print-Multiple-Collations-tp3358391p3358970.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Spellcheck

2011-09-08 Thread tamanjit.bin...@yahoo.co.in
Hi if you have not figyured it out as yet, this might help::

Issues with *schema.xml*

field name=textSpell type=text stored=false indexed=true
multiValued=true / 

here the type should actually be textSpell (fieldType that you have defined
earlier)


 Also I would suggest that you use a seperate RequestHandler for your
queries. You alreasy have spellCheckCompRH defined in the solrconfig.xml, to
which you can make the changes and add your lst

 So really your fist query should be like:


http://localhost:8983/solr/spellCheckCompRH/?q=*:*version=2.2start=0rows=10indent=onspellcheck=truespellcheck.build=truespellcheck.dictionary=textSpell





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


Re: Spellcheck

2011-09-08 Thread Danicela nutch
I already tried with field type = textSpell but it didn't work, I replaced it 
though.


 I found this code :


 requestHandler name=/spellCheckCompRH class=solr.SearchHandler
 lst name=defaults
 !-- Optional, must match spell checker's name as defined above, defaults to 
default --
 str name=spellcheck.dictionarydefault/str
 !-- omp = Only More Popular --
 str name=spellcheck.onlyMorePopularfalse/str
 !-- exr = Extended Results --
 str name=spellcheck.extendedResultsfalse/str
 !-- The number of suggestions to return --
 str name=spellcheck.count1/str
 /lst

 arr name=last-components
 strspellcheck/str
 /arr
 /requestHandler


 I put this in solrconfig.xml and used the query you gave me, there is the str 
name=commandbuild/str line (like before) but I don't have any lst 
name=spellcheck
 lst name=suggestions//lst


 When I told doc/doc this was a shortcut to mean I have many docs, but they 
aren't empty, there are many fields in them.


 PS : I have the impression my keyboard 'returns' don't show well in the 
mailing list making them very hard to read, is this true ? If yes, how to fix 
that ?

- Original Message -
From: tamanjit.bin...@yahoo.co.in
Sent: 09/08/11 08:43 AM
To: solr-user@lucene.apache.org
Subject: Re: Spellcheck

 Hi if you have not figyured it out as yet, this might help:: Issues with 
*schema.xml* field name=textSpell type=text stored=false indexed=true 
multiValued=true / here the type should actually be textSpell (fieldType 
that you have defined earlier) Also I would suggest that you use a seperate 
RequestHandler for your queries. You alreasy have spellCheckCompRH defined in 
the solrconfig.xml, to which you can make the changes and add your lst So 
really your fist query should be like: 
http://localhost:8983/solr/spellCheckCompRH/?q=*:*version=2.2start=0rows=10indent=onspellcheck=truespellcheck.build=truespellcheck.dictionary=textSpell
 -- View this message in context: 
http://lucene.472066.n3.nabble.com/Spellcheck-tp3315994p3318854.html Sent from 
the Solr - User mailing list archive at Nabble.com.


Re: Spellcheck

2011-09-08 Thread Danicela nutch
I already tried with field type = textSpell but it didn't work, I replaced it 
though.


 I found this code :


 requestHandler name=/spellCheckCompRH class=solr.SearchHandler
 lst name=defaults
 !-- Optional, must match spell checker's name as defined above, defaults to 
default --
 str name=spellcheck.dictionarydefault/str
 !-- omp = Only More Popular --
 str name=spellcheck.onlyMorePopularfalse/str
 !-- exr = Extended Results --
 str name=spellcheck.extendedResultsfalse/str
 !-- The number of suggestions to return --
 str name=spellcheck.count1/str
 /lst

 arr name=last-components
 strspellcheck/str
 /arr
 /requestHandler


 I put this in solrconfig.xml and used the query you gave me, there is the str 
name=commandbuild/str line (like before) but I don't have any lst 
name=spellchecklst name=suggestions//lst


 When I told doc/doc this was a shortcut to mean I have many docs, but they 
aren't empty, there are many fields in them.


 PS : I have the impression my keyboard 'returns' don't show well in the 
mailing list making them very hard to read, is this true ? If yes, how to fix 
that ?


- Original Message -
From: tamanjit.bin...@yahoo.co.in
Sent: 09/08/11 08:43 AM
To: solr-user@lucene.apache.org
Subject: Re: Spellcheck

 Hi if you have not figyured it out as yet, this might help:: Issues with 
*schema.xml* field name=textSpell type=text stored=false indexed=true 
multiValued=true / here the type should actually be textSpell (fieldType 
that you have defined earlier) Also I would suggest that you use a seperate 
RequestHandler for your queries. You alreasy have spellCheckCompRH defined in 
the solrconfig.xml, to which you can make the changes and add your lst So 
really your fist query should be like: 
http://localhost:8983/solr/spellCheckCompRH/?q=*:*version=2.2start=0rows=10indent=onspellcheck=truespellcheck.build=truespellcheck.dictionary=textSpell
 -- View this message in context: 
http://lucene.472066.n3.nabble.com/Spellcheck-tp3315994p3318854.html Sent from 
the Solr - User mailing list archive at Nabble.com.


Re: Spellcheck

2011-09-08 Thread tamanjit.bin...@yahoo.co.in
In the RequestHandler spellCheckCompRH you have to make changes as follows:

 requestHandler name=/spellCheckCompRH class=solr.SearchHandler
lst name=spellcheck
str name=echoParamsexplicit/str
  
str name=spellcheck.dictionarytextSpell/str
  str name=spellcheck.onlyMorePopularfalse/str
  
  str name=spellcheck.extendedResultstrue/str
  
  str name=spellcheck.count5/str
/lst
arr name=last-components
  strspellcheck/str
/arr
  /requestHandler

This hopefully should do it.

Also I would suggest that for the time being (i.e. till you get some
results) you dont go with a multivalued field, but with a single valued one.
Build up a dictionary, get some results and then move for multi-valued. I
rememberfacing some issues with regard to multivalued field myself.

Also keep the type of the field in schema.xml as textSpell only.


Am not sure if you have configured the  searchComponent properly

Find:
searchComponent name=spellcheck class=solr.SpellCheckComponent


and add

 lst name=spellchecker
str name=classnamesolr.IndexBasedSpellChecker/str
str name=nametextSpell /str
str name=fieldtextSpell/str
str name=buildOnOptimizetrue/str
str name=spellcheckIndexDir./spellcheckerDefault/str
   /lst






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


  1   2   3   >