Re: AW: AW: auto completion search with solr using NGrams in SOLR

2014-10-01 Thread Erick Erickson
Perhaps your ngram filter is set to terminate at 14 (maxGram)?

Best,
Erick

On Wed, Oct 1, 2014 at 3:18 AM, xoku  wrote:
> help me!
> i can't find all result.
> str name="spellcheck.count">200
> Ex:
> i find: file
> result expected: file name documentabcxyz
> but solr return result (suggest: result term object) :
> -
>
> [suggestions:protected] => Array
> (
> [0] => file
> [1] => file (whitespace)
> [2] => file n
> [3] => file nam
> [4] =>file name
> [5] => file name (whitespace)
> [6] => file name do
> [7] => file name doc
> [8] => file name docu (always is 14 character)
>
> )
> ---
> when result is 14 character, it stop and show result is file name docu.
>
>
>
>
>
>
>
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/auto-completion-search-with-solr-using-NGrams-in-SOLR-tp3998559p4162063.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: AW: AW: auto completion search with solr using NGrams in SOLR

2014-10-01 Thread xoku
help me!
i can't find all result. 
str name="spellcheck.count">200
Ex:
i find: file
result expected: file name documentabcxyz
but solr return result (suggest: result term object) :
-

[suggestions:protected] => Array
(
[0] => file
[1] => file (whitespace)
[2] => file n
[3] => file nam
[4] =>file name
[5] => file name (whitespace)
[6] => file name do
[7] => file name doc 
[8] => file name docu (always is 14 character)

)
---
when result is 14 character, it stop and show result is file name docu.








--
View this message in context: 
http://lucene.472066.n3.nabble.com/auto-completion-search-with-solr-using-NGrams-in-SOLR-tp3998559p4162063.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: AW: AW: auto completion search with solr using NGrams in SOLR

2014-04-08 Thread atpatil11
Hi I have done the same changes as you told & changed the code with my fields
name. However I'm getting following error. I even reverted edited code but
still its throwing same error. We're having Solr 4.6. When i restart the
solr it says solr (pid 4610) already running.

SolrCore Initialization Failures

ole-beta:
org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:
copyField dest :'autocomplete_text' is not an explicit field and doesn't
match a dynamicField.. Schema file is
/opt/bitnami/apache-solr/solr/collection1/schema.xml 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/auto-completion-search-with-solr-using-NGrams-in-SOLR-tp3998559p4129807.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: AW: AW: auto completion search with solr using NGrams in SOLR

2013-10-28 Thread anurag.sharma
Hi ... I am trying to build autocomplete functionality using your post. But I
am getting the following error

*2577 [coreLoadExecutor-3-thread-1] WARN 
org.apache.solr.spelling.suggest.Suggester  – Loading stored lookup data
failed
java.io.FileNotFoundException:
/home/anurag/Downloads/solr-4.4.0/example/solr/collection1/data/suggest/tst.dat
(No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:137)
at org.apache.solr.spelling.suggest.Suggester.init(Suggester.java:116)
at
org.apache.solr.handler.component.SpellCheckComponent.inform(SpellCheckComponent.java:623)
at
org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:601)
at org.apache.solr.core.SolrCore.(SolrCore.java:830)
at org.apache.solr.core.SolrCore.(SolrCore.java:629)
*

I am using solr 4.4. Is the suggester component still works in this version



--
View this message in context: 
http://lucene.472066.n3.nabble.com/auto-completion-search-with-solr-using-NGrams-in-SOLR-tp3998559p4098032.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: AW: AW: auto completion search with solr using NGrams in SOLR

2013-01-24 Thread Naresh
Hi,
You can fetch all the stored fields by passing them as part of
*fl*parameter. Go through
http://wiki.apache.org/solr/CommonQueryParameters#fl


On Thu, Jan 24, 2013 at 8:56 PM, AnnaVak  wrote:

> Thanks for your solution it works for me too, I'm new with Solr but how I
> can
> additionally fetch another fields not only field that was used for
> searching? For example I have product title and image fields and I want to
> get the title but also related to this title image ? How can I do this?
>
> Thanks in advance
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/auto-completion-search-with-solr-using-NGrams-in-SOLR-tp3998559p4035931.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
Regards
Naresh


Re: AW: AW: auto completion search with solr using NGrams in SOLR

2013-01-24 Thread AnnaVak
Thanks for your solution it works for me too, I'm new with Solr but how I can
additionally fetch another fields not only field that was used for
searching? For example I have product title and image fields and I want to
get the title but also related to this title image ? How can I do this?

Thanks in advance 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/auto-completion-search-with-solr-using-NGrams-in-SOLR-tp3998559p4035931.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: AW: AW: auto completion search with solr using NGrams in SOLR

2012-09-25 Thread aniljayanti
Hi, 

Finally got Solved using TermComponents.

schema.xml
--

  

 
 



  




 


URL :

http://localhost:8080/solr/terms?*terms.fl=autocomplete_text&omitHeader=true&terms.sort=index&terms.prefix=mad*

Response :

 

 

*1 
1 
2 
1 
1   
1 *

 




--
View this message in context: 
http://lucene.472066.n3.nabble.com/auto-completion-search-with-solr-using-NGrams-in-SOLR-tp3998559p4010125.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: AW: AW: auto completion search with solr using NGrams in SOLR

2012-09-06 Thread aniljayanti
Hi,

Thanks,

Iam getting the results with below url.

*suggest/?q="michael b"&df=title&defType=lucene&fl=title*

But, i want the results in spellcheck section.

i want to search with title or empname or both. 

Aniljayanti



--
View this message in context: 
http://lucene.472066.n3.nabble.com/auto-completion-search-with-solr-using-NGrams-in-SOLR-tp3998559p4005812.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: AW: AW: auto completion search with solr using NGrams in SOLR

2012-09-05 Thread Ahmet Arslan
> i want to search with title and empname both. 

I know, I give that URL just to get the idea here.
If you try 
suggest/?q="michael b"&df=title&defType=lucene&fl=title
you will see that your interested will in results section not  section.

> or title or song...). Here (*suggest/?q="michael
> b"&df=title&defType=lucene*) we are specifying the
> title type search. 

q=title:"michael b" OR empname:"michael b"&fl=title,empname would the trick.


> I removed said configurations in solrconfig.xml file, got
> result like below.

If you removed it, then there shouldn't be spellcheck response. And you are 
still looking results in the wrong place.


Re: AW: AW: auto completion search with solr using NGrams in SOLR

2012-09-05 Thread aniljayanti
HI,

Thanks,

i want to search with title and empname both. for example when we use any
search engine like google,yahoo... we donot specify any type that is (name
or title or song...). Here (*suggest/?q="michael
b"&df=title&defType=lucene*) we are specifying the title type search. 

I removed said configurations in solrconfig.xml file, got result like below.


  
  
  10 
  1 
  8 
  
  michael 
  michael 
  michael " 
  michael j 
  michael ja 
  michael jac 
  michael jack 
  michael jacks 
  michael jackso 
  michael jackson 
  
  
  
  10 
  9 
  10 
  
  b 
  b 
  ba 
  bab 
  bar 
  barb 
  be 
  ben 
  bi 
  bl 
  
  
  "michael b" 
  
  

I sent my schema and solrconfig xml file configurations. Please check.

Aniljayanti



--
View this message in context: 
http://lucene.472066.n3.nabble.com/auto-completion-search-with-solr-using-NGrams-in-SOLR-tp3998559p4005545.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: AW: AW: auto completion search with solr using NGrams in SOLR

2012-09-05 Thread Ahmet Arslan
Hi,

You are trying to use two different approaches at the same time.

1) Remove 


  suggest
  query


from your requestHandler.

2) Execute this query URL : suggest/?q="michael b"&df=title&defType=lucene

And you will see my point.

--- On Wed, 9/5/12, aniljayanti  wrote:

> From: aniljayanti 
> Subject: Re: AW: AW: auto completion search with solr using NGrams in SOLR
> To: solr-user@lucene.apache.org
> Date: Wednesday, September 5, 2012, 7:29 AM
> Hi,
> 
> thanks,
> 
> I m sending my whole configurations in schema and
> solrconfig.xml files.
> 
> 
> schema.xml
> ---
> 
>  positionIncrementGap="100"
> omitNorms="true">
>     
>            class="solr.KeywordTokenizerFactory" />
>            class="solr.LowerCaseFilterFactory" />
>            class="solr.PatternReplaceFilterFactory" pattern="\s+"
> replacement=" " replace="all"/>
>            class="solr.EdgeNGramFilterFactory" minGramSize="1"
> maxGramSize="15" side="front" />
>     
>     
>           class="solr.KeywordTokenizerFactory" />
>           class="solr.LowerCaseFilterFactory" />
>           class="solr.PatternReplaceFilterFactory" pattern="\s+"
> replacement=" " replace="all"/>
>     
>   
> 
> 
>  type="edgytext"     indexed="true"
>     stored="true" />
>      indexed="true"    
> stored="true" />
> 
>  indexed="true"
> stored="false"  multiValued="true" omitNorms="true"
> omitTermFreqAndPositions="false" />
> 
>  
>  dest="autocomplete_text"/>
> *
> solrconfig.xml
> -
>  name="suggest">
>     
>        name="name">suggest
>        name="classname">org.apache.solr.spelling.suggest.Suggester
>        name="lookupImpl">org.apache.solr.spelling.suggest.fst.FSTLookup 
>     
>        name="storeDir">suggest
>        name="field">autocomplete_text
>        name="exactMatchFirst">true
>        name="threshold">0.005
>        name="buildOnCommit">true
>        name="buildOnOptimize">true
>     
>    
>        name="name">jarowinkler 
>        name="field">lowerfilt 
>        name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance
> 
>        name="spellcheckIndexDir">spellchecker 
>    
>       name="queryAnalyzerFieldType">edgytext 
>   
>   
>    class="org.apache.solr.handler.component.SearchHandler"
> name="/suggest" startup="lazy">
> 
>     
>        name="spellcheck">true
>        name="spellcheck.dictionary">suggest
>        name="spellcheck.onlyMorePopular">true
>        name="spellcheck.count">5
>        name="spellcheck.collate">false
>        name="spellcheck.maxCollations">5
>        name="spellcheck.maxCollationTries">1000
>        name="spellcheck.collateExtendedResults">true
>     
>     
>       suggest
>       query
>     
>   
> 
> URL : suggest/?q="michael b"
> -
> Response : 
> 
>  
>  
>  
>   0 
>   3 
>   
>    /> 
>  
>  
>  
>   10 
>   1 
>   8 
>   
>   michael bully herbig 
>   michael bolton 
>   michael bolton: arias 
>   michael falch 
>   michael holm 
>   michael jackson 
>   michael neale 
>   michael penn 
>   michael salgado 
>   michael w. smith 
>   
>   
>  
>   10 
>   9 
>   10 
>   
>   b in the mix - the remixes 
>   b2k 
>   backstreet boys 
>   backyard babies 
>   banda maguey 
>   barbra streisand 
>   barry manilow 
>   benny goodman 
>   beny more 
>   beyonce 
>   
>   
>   "michael bully herbig b
> in the mix - the
> remixes" 
>   
>   
>   
> 
> 
> 
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/auto-completion-search-with-solr-using-NGrams-in-SOLR-tp3998559p4005490.html
> Sent from the Solr - User mailing list archive at
> Nabble.com.
>


Re: AW: AW: auto completion search with solr using NGrams in SOLR

2012-09-04 Thread aniljayanti
Hi,

thanks,

I m sending my whole configurations in schema and solrconfig.xml files.


schema.xml
---



  
  
  
  


 
 
 

  







 

*
solrconfig.xml
-


  suggest
  org.apache.solr.spelling.suggest.Suggester
  org.apache.solr.spelling.suggest.fst.FSTLookup  
  suggest
  autocomplete_text
  true
  0.005
  true
  true

   
  jarowinkler 
  lowerfilt 
  org.apache.lucene.search.spell.JaroWinklerDistance 
  spellchecker 
   
 edgytext 
  
  
  


  true
  suggest
  true
  5
  false
  5
  1000
  true


  suggest
  query

  

URL : suggest/?q="michael b"
-
Response : 

 
 
 
  0 
  3 
  
   
 
 
 
  10 
  1 
  8 
  
  michael bully herbig 
  michael bolton 
  michael bolton: arias 
  michael falch 
  michael holm 
  michael jackson 
  michael neale 
  michael penn 
  michael salgado 
  michael w. smith 
  
  
 
  10 
  9 
  10 
  
  b in the mix - the remixes 
  b2k 
  backstreet boys 
  backyard babies 
  banda maguey 
  barbra streisand 
  barry manilow 
  benny goodman 
  beny more 
  beyonce 
  
  
  "michael bully herbig b in the mix - the
remixes" 
  
  
  



--
View this message in context: 
http://lucene.472066.n3.nabble.com/auto-completion-search-with-solr-using-NGrams-in-SOLR-tp3998559p4005490.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: AW: AW: auto completion search with solr using NGrams in SOLR

2012-09-04 Thread Kiran Jayakumar
I wonder why. I had a similar use case & works great for me. If you can
send the snapshot of analysis for a sample string (say "hello world " for
indexing, "hel" - positive case, "wo" - negative case for querying), then
we can see whats going on. Also the debug query output would be helpful.


On Fri, Aug 31, 2012 at 10:28 PM, aniljayanti wrote:

> Hi,
>
> Thanks,
>
> As i already used "KeywordTokenizerFactory" in my earlier posts.
>
>  positionIncrementGap="100"
> omitNorms="true">
> 
>   *
>   
>replacement=" " replace="all"/>
>maxGramSize="15" side="front" />
> *   
>
>  *
>  
>   replacement=" " replace="all"/>
> *   
>   
>
> getting same results.
>
> AnilJayanti
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/auto-completion-search-with-solr-using-NGrams-in-SOLR-tp3998559p4004871.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


Re: AW: AW: auto completion search with solr using NGrams in SOLR

2012-09-03 Thread aniljayanti
Hi,

thanks,

Im not able to attach asked xml files here. Can u give me ur Email id, so
that i can send schema and solrconfig.xmls.

Regards,
AnilJayanti



--
View this message in context: 
http://lucene.472066.n3.nabble.com/auto-completion-search-with-solr-using-NGrams-in-SOLR-tp3998559p4005141.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: AW: AW: auto completion search with solr using NGrams in SOLR

2012-09-01 Thread Ahmet Arslan
Hi Anil,

Your search URL suggest/?q="michael ja" and fieldType (without 
PatternReplaceFilterFactory) is correct.

However looking in to your response carefully I see that you have numFound="0" 
no results.

And results you point come form "suggest" (probably suggester component). But 
in this approach (auto completion with NGrams) suggestions will be simply your 
search results. Remove suggester component from RequestHander.

I suspect 
* you are not querying correct field
* you are not populating that field via copyField

What is your default search field? Can you send/post complete solrconfig.xml 
and schema.xml?


--- On Sat, 9/1/12, aniljayanti  wrote:

> From: aniljayanti 
> Subject: Re: AW: AW: auto completion search with solr using NGrams in SOLR
> To: solr-user@lucene.apache.org
> Date: Saturday, September 1, 2012, 8:28 AM
> Hi,
> 
> Thanks,
> 
> As i already used "KeywordTokenizerFactory" in my earlier
> posts.
> 
>  positionIncrementGap="100"
> omitNorms="true">
>         
>       * class="solr.KeywordTokenizerFactory" />
>            class="solr.LowerCaseFilterFactory" />
>            class="solr.PatternReplaceFilterFactory" pattern="\s+"
> replacement=" " replace="all"/>
>            class="solr.EdgeNGramFilterFactory" minGramSize="1"
> maxGramSize="15" side="front" />
> *   
>    
>          * class="solr.KeywordTokenizerFactory" />
>           class="solr.LowerCaseFilterFactory" />
>           class="solr.PatternReplaceFilterFactory" pattern="\s+"
> replacement=" " replace="all"/>
> *   
>    
> 
> getting same results. 
> 
> AnilJayanti
> 
> 
> 
> 
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/auto-completion-search-with-solr-using-NGrams-in-SOLR-tp3998559p4004871.html
> Sent from the Solr - User mailing list archive at
> Nabble.com.
>


Re: AW: AW: auto completion search with solr using NGrams in SOLR

2012-08-31 Thread aniljayanti
Hi,

Thanks,

As i already used "KeywordTokenizerFactory" in my earlier posts.



  *
  
  
  
*   
   
 *
 
 
*   
   

getting same results. 

AnilJayanti




--
View this message in context: 
http://lucene.472066.n3.nabble.com/auto-completion-search-with-solr-using-NGrams-in-SOLR-tp3998559p4004871.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: AW: AW: auto completion search with solr using NGrams in SOLR

2012-08-31 Thread Kiran Jayakumar
Try this:



http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.KeywordTokenizerFactory


On Thu, Aug 30, 2012 at 9:07 PM, aniljayanti  wrote:

> Hi,
>
> thanks,
>
> I checked with given changes, getting below error saying that SOLR is not
> allowing without tokenizer.
>
> org.apache.solr.common.SolrException: analyzer without class or tokenizer &
> filter list at
> org.apache.solr.schema.IndexSchema.readAnalyzer(IndexSchema.java:914) at
> org.apache.solr.schema.IndexSchema.access$100(IndexSchema.java:62) at
> ...
>
> can u tell me wht to do?
>
> AnilJayanti
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/auto-completion-search-with-solr-using-NGrams-in-SOLR-tp3998559p4004605.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


Re: AW: AW: auto completion search with solr using NGrams in SOLR

2012-08-30 Thread aniljayanti
Hi,

thanks,

I checked with given changes, getting below error saying that SOLR is not
allowing without tokenizer.

org.apache.solr.common.SolrException: analyzer without class or tokenizer &
filter list at
org.apache.solr.schema.IndexSchema.readAnalyzer(IndexSchema.java:914) at
org.apache.solr.schema.IndexSchema.access$100(IndexSchema.java:62) at 
...

can u tell me wht to do?

AnilJayanti



--
View this message in context: 
http://lucene.472066.n3.nabble.com/auto-completion-search-with-solr-using-NGrams-in-SOLR-tp3998559p4004605.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: AW: AW: auto completion search with solr using NGrams in SOLR

2012-08-30 Thread Ahmet Arslan
> I tried with below said changes, but getting same result as
> earlier.
> 
> suggest/?q="michael ja"
> ---
>  positionIncrementGap="100"
> omitNorms="true">
>     
>        class="solr.KeywordTokenizerFactory" />
>        class="solr.LowerCaseFilterFactory" />
>        class="solr.EdgeNGramFilterFactory" minGramSize="1"
> maxGramSize="15" side="front" />
>        class="solr.RemoveDuplicatesTokenFilterFactory"/>
>    
>    
>       class="solr.KeywordTokenizerFactory" /> 
>   class="solr.LowerCaseFilterFactory" /> 
> 
>    
>   
> 
> Response :
> 
>   
> - 
> - 
>   0 
>   1 
>   
>    /> 
> - 
> - 
> - 
>   10 
>   1 
>   8 
> - 
>   *michael "bully" herbig 
>   michael bolton 
>   michael bolton: arias 
>   michael falch 
>   michael holm 
>   michael jackson 
>   michael neale 
>   michael penn 
>   michael salgado 
>   michael w. smith* 
>   
>   
> - 
>   10 
>   9 
>   11 
> - 
> *  ja me tanssimme 
>   jacob andersen 
>   jacob haugaard 
>   jagged edge 
>   jaguares 
>   jamiroquai 
>   jamppa tuominen 
>   jane olivor 
>   janis joplin 
>   janne tulkki* 
>   
>   
>   "michael "bully" herbig
> ja me tanssimme" 
>   
>   
>   

Hi, looking in to your response carefully I see that you have numFound="0"
And results you point come form "suggest". The field type above is correct. But 
in this approach suggestions will be simply your search results.  What is your 
default search field?



Re: AW: AW: auto completion search with solr using NGrams in SOLR

2012-08-30 Thread Kiran Jayakumar
You wouldnt need any tokenizer, I'm not sure if Solr will allow that. You
also need to move the Edge n gram filter to index from query (I think Ahmet
suggested this). It will look something like this:

 

  
  
  
   
   
 
 
   
  

note that pattern replace goes before edge, order is very important. I
still highly recommend using the analysis option in Solr admin. It will
show how your text is transformed.

On Wed, Aug 29, 2012 at 9:40 PM, aniljayanti  wrote:

> Hi,
>
> thanks,
>
> I added "PatternReplaceFilterFactory" like below.Getting results
> differently(not like suggester). You suggested to remove
> "KeywordTokenizerFactory" , "PatternReplace" is a FilterFactory, then which
> "TokenizerFactory" need to use ?
>
>positionIncrementGap="100" omitNorms="true">
> 
>   
>   
>
>   
>replacement=" " replace="all"/>
>
>
>  
>  
>   maxGramSize="15" side="front" />
>   replacement=" " replace="all"/>
>
>   
>
> Result :
>
> 
> - 
> - 
>   0
>   2
>   
>   
> - 
> - 
> - 
>   10
>   0
>   7
> - 
>   *michael
>   michael
>   michael "
>   michael j
>   michael ja
>   michael jac
>   michael jack
>   michael jacks
>   michael jackso
>   michael jackson*
>   
>   
> - 
>   10
>   8
>   10
> - 
>   *ja
>   ja
>   jag
>   jam
>   jami
>   jamp
>   jampp
>   jamppa
>   jamppa
>   jamppa t*
>   
>   
>   michael ja
>   
>   
>   
>
> Please suggest me if anything missing?
>
> Regards,
>
> AnilJayanti
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/auto-completion-search-with-solr-using-NGrams-in-SOLR-tp3998559p4004231.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


Re: AW: AW: auto completion search with solr using NGrams in SOLR

2012-08-29 Thread aniljayanti
Hi,

thanks,

I added "PatternReplaceFilterFactory" like below.Getting results
differently(not like suggester). You suggested to remove
"KeywordTokenizerFactory" , "PatternReplace" is a FilterFactory, then which
"TokenizerFactory" need to use ? 

  

  
   

  
  
   
   
  
 
  
 
   
  

Result :

 
- 
- 
  0 
  2 
  
   
- 
- 
- 
  10 
  0 
  7 
- 
  *michael 
  michael 
  michael " 
  michael j 
  michael ja 
  michael jac 
  michael jack 
  michael jacks 
  michael jackso 
  michael jackson* 
  
  
- 
  10 
  8 
  10 
- 
  *ja 
  ja 
  jag 
  jam 
  jami 
  jamp 
  jampp 
  jamppa 
  jamppa 
  jamppa t* 
  
  
  michael ja 
  
  
  

Please suggest me if anything missing?

Regards,

AnilJayanti



--
View this message in context: 
http://lucene.472066.n3.nabble.com/auto-completion-search-with-solr-using-NGrams-in-SOLR-tp3998559p4004231.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: AW: AW: auto completion search with solr using NGrams in SOLR

2012-08-29 Thread aniljayanti
Hi 

thanks,

I tried with below said changes, but getting same result as earlier.

suggest/?q="michael ja"
---


  
  
  
  
   
   
  
   
   
  

Response :

  
- 
- 
  0 
  1 
  
   
- 
- 
- 
  10 
  1 
  8 
- 
  *michael "bully" herbig 
  michael bolton 
  michael bolton: arias 
  michael falch 
  michael holm 
  michael jackson 
  michael neale 
  michael penn 
  michael salgado 
  michael w. smith* 
  
  
- 
  10 
  9 
  11 
- 
*  ja me tanssimme 
  jacob andersen 
  jacob haugaard 
  jagged edge 
  jaguares 
  jamiroquai 
  jamppa tuominen 
  jane olivor 
  janis joplin 
  janne tulkki* 
  
  
  "michael "bully" herbig ja me tanssimme" 
  
  
  

Please Help,

AnilHayanti




--
View this message in context: 
http://lucene.472066.n3.nabble.com/auto-completion-search-with-solr-using-NGrams-in-SOLR-tp3998559p4004230.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: AW: AW: auto completion search with solr using NGrams in SOLR

2012-08-29 Thread Kiran Jayakumar
You need this for both index and query:



http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.PatternReplaceFilterFactory


On Wed, Aug 29, 2012 at 4:55 AM, aniljayanti  wrote:

> Hi,
>
> thanks for ur reply,
>
> I donot know how to remove multiple white spaces using regax in the search
> text. Can u share me that one.
>
> Thanks,
>
> AnilJayanti
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/auto-completion-search-with-solr-using-NGrams-in-SOLR-tp3998559p4003991.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


Re: AW: AW: auto completion search with solr using NGrams in SOLR

2012-08-29 Thread aniljayanti
Hi,

thanks for ur reply,

I donot know how to remove multiple white spaces using regax in the search
text. Can u share me that one.

Thanks,

AnilJayanti



--
View this message in context: 
http://lucene.472066.n3.nabble.com/auto-completion-search-with-solr-using-NGrams-in-SOLR-tp3998559p4003991.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: AW: AW: auto completion search with solr using NGrams in SOLR

2012-08-29 Thread Ahmet Arslan
> Hi,
> 
> thanks, 
> 
> I tried by adding " marks,  but still giving same
> results.
> 
> http://localhost:8080/test/suggest/?q="michael f"

Looking back to your field type definition, i saw that you have defined 

   in query analyzer. Move this into index analyzer. Restart 
solr, re-index and suggest/?q="michael f" should return expected results.


Re: AW: AW: auto completion search with solr using NGrams in SOLR

2012-08-28 Thread Kiran Jayakumar
Since you have , during
indexing time, it is going split the text on white spaces and then apply
edge n-grams. If you remove this & may be replace it with a simpler regex
which does basic clean up like removing multiple white spaces etc., then it
will not match on the beginning of non-first words. You can use the
analyzer and see how your text is transformed during index/query time.

On Tue, Aug 28, 2012 at 4:57 AM, aniljayanti  wrote:

> Hi ,
>
> Thanks for reply,
>
> Now it's working for me after changing like below.
>
>  positionIncrementGap="100"
> omitNorms="true">
> 
>   
>   
>   
>
>
>  
>  
>   maxGramSize="15" side="front" />
>
>   
>
>
>  omitNorms="true" omitTermFreqAndPositions="true"/>
>  omitNorms="true" omitTermFreqAndPositions="true" />
>
>  stored="false"  multiValued="true" omitNorms="true"
> omitTermFreqAndPositions="false" />
>
> 
> 
> **
> URL : http://localhost:8080/test/suggest/?q=michael
>
> Result :
>  
> - 
> - 
>   0
>   1
>   
>   
> - 
> - 
> - 
>   9
>   0
>   7
> - 
>   michael bolton
>   michael foret
>   michael houser
>   michael o'brien
>   michael penn
>   michael row your boat ashore
>   michael tilson thomas
>   michael w. smith
>   michael w. smith featuring andrae crouch
>   
>   
>   michael bolton
>   
>   
>   
>
> It's working fine for me. When im searching with "michael f", getting
> response like below. (http://localhost:8080/test/suggest/?q=michael f)
>
> Response :
>
>   
> - 
> - 
>   0
>   1
>   
>   
> - 
> - 
> - 
>   9
>   0
>   7
> - 
>   michael bolton
>   michael foret
>   michael houser
>   michael o'brien
>   michael penn
>   michael row your boat ashore
>   michael tilson thomas
>   michael w. smith
>   michael w. smith featuring andrae crouch
>   
>   
> - 
>   10
>   8
>   9
> - 
>   f**k the facts
>   fairest lord jesus
>   fatboy slim
>   ffh
>   fiona apple
>   foo fighters
>   frank sinatra
>   frans bauer
>   franz ferdinand
>   françois rauber
>   
>   
>   michael bolton f**k the facts
>   
>   
>   .
>
> So when i search with "michael f" then, i should get "michael foret" only.
> Data coming starts with "f". Please help me on this.
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/auto-completion-search-with-solr-using-NGrams-in-SOLR-tp3998559p4003689.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


Re: AW: AW: auto completion search with solr using NGrams in SOLR

2012-08-28 Thread Ahmet Arslan

You need to use quotes in your query :

http://localhost:8080/test/suggest/?q="michael f"


--- On Tue, 8/28/12, aniljayanti  wrote:

> From: aniljayanti 
> Subject: Re: AW: AW: auto completion search with solr using NGrams in SOLR
> To: solr-user@lucene.apache.org
> Date: Tuesday, August 28, 2012, 2:57 PM
> Hi ,
> 
> Thanks for reply,
> 
> Now it's working for me after changing like below.
> 
>  positionIncrementGap="100"
> omitNorms="true">
>     
>        class="solr.KeywordTokenizerFactory" />
>        class="solr.LowerCaseFilterFactory" /> 
>        class="solr.RemoveDuplicatesTokenFilterFactory"/>
>    
>    
>       class="solr.KeywordTokenizerFactory" /> 
>   class="solr.LowerCaseFilterFactory" />
>   class="solr.EdgeNGramFilterFactory" minGramSize="1"
> maxGramSize="15" side="front"
> /> 
>    
>   
> 
> 
>  stored="true"
> omitNorms="true" omitTermFreqAndPositions="true"/>
>  stored="true"
> omitNorms="true" omitTermFreqAndPositions="true" />
> 
>  indexed="true"
> stored="false"  multiValued="true" omitNorms="true"
> omitTermFreqAndPositions="false" />
> 
>  dest="autocomplete_text"/>
>  
> **
> URL : http://localhost:8080/test/suggest/?q=michael
> 
> Result :
>   
> - 
> - 
>   0 
>   1 
>   
>    /> 
> - 
> - 
> - 
>   9 
>   0 
>   7 
> - 
>   michael bolton 
>   michael foret 
>   michael houser 
>   michael o'brien 
>   michael penn 
>   michael row your boat ashore 
>   michael tilson thomas 
>   michael w. smith 
>   michael w. smith featuring andrae
> crouch 
>   
>   
>   michael
> bolton 
>   
>   
>   
> 
> It's working fine for me. When im searching with "michael
> f", getting
> response like below. (http://localhost:8080/test/suggest/?q=michael f)
> 
> Response :
> 
>    
> - 
> - 
>   0 
>   1 
>   
>    /> 
> - 
> - 
> - 
>   9 
>   0 
>   7 
> - 
>   michael bolton 
>   michael foret 
>   michael houser 
>   michael o'brien 
>   michael penn 
>   michael row your boat ashore 
>   michael tilson thomas 
>   michael w. smith 
>   michael w. smith featuring andrae
> crouch 
>   
>   
> - 
>   10 
>   8 
>   9 
> - 
>   f**k the facts 
>   fairest lord jesus 
>   fatboy slim 
>   ffh 
>   fiona apple 
>   foo fighters 
>   frank sinatra 
>   frans bauer 
>   franz ferdinand 
>   françois rauber 
>   
>   
>   michael bolton f**k the
> facts 
>   
>   
>   .
> 
> So when i search with "michael f" then, i should get
> "michael foret" only.
> Data coming starts with "f". Please help me on this.
> 
> 
> 
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/auto-completion-search-with-solr-using-NGrams-in-SOLR-tp3998559p4003689.html
> Sent from the Solr - User mailing list archive at
> Nabble.com.
>


Re: AW: AW: auto completion search with solr using NGrams in SOLR

2012-08-04 Thread Ahmet Arslan


--- On Sat, 8/4/12, aniljayanti  wrote:

> From: aniljayanti 
> Subject: Re: AW: AW: auto completion search with solr using NGrams in SOLR
> To: solr-user@lucene.apache.org
> Date: Saturday, August 4, 2012, 8:57 AM
> Hi 
> thanks,
> 
> which doing searching i will search either with empname or
> title only. And
> also not using any asterics in the query.
> ex : if i search with "mic" result should come like 
> 
> michale jackson
> michale border
> michale smith
> 
> want the result just like google search.
> 
> can us suggest me wht are the configuration need to
> add/change to get the
> result like google search ?. 
> for my required result which tokenizers need to use. ?
> can u tell me how to call a query for this??

Only suspicious thing is omitTermFreqAndPositions="true". Try changing this to 
false. 

Also see Chantal's message http://search-lucene.com/m/rPrhO1RIlfQ


Re: AW: AW: auto completion search with solr using NGrams in SOLR

2012-08-03 Thread aniljayanti
Hi 
thanks,

which doing searching i will search either with empname or title only. And
also not using any asterics in the query.
ex : if i search with "mic" result should come like 

michale jackson
michale border
michale smith

want the result just like google search.

can us suggest me wht are the configuration need to add/change to get the
result like google search ?. 
for my required result which tokenizers need to use. ?
can u tell me how to call a query for this??

thanks,



--
View this message in context: 
http://lucene.472066.n3.nabble.com/auto-completion-search-with-solr-using-NGrams-in-SOLR-tp3998559p3999171.html
Sent from the Solr - User mailing list archive at Nabble.com.


AW: AW: auto completion search with solr using NGrams in SOLR

2012-08-02 Thread Markus Klose
If you want to search in the two fields "title" and "empname" you have to use 
the query parser (e)dismax
http://wiki.apache.org/solr/ExtendedDisMax
you need to specify the qf param: qf=title empname

check your solrconfig.xml to verifiy which queryparser you are using right now.


In your usecase you do not need the asterics in the query.
"q=am" in combination with the edgengram will find aman, amar, amal

Viele Grüße aus Augsburg

Markus Klose
SHI Elektronische Medien GmbH 
 




-Ursprüngliche Nachricht-
Von: aniljayanti [mailto:anil.jaya...@gmail.com] 
Gesendet: Donnerstag, 2. August 2012 09:34
An: solr-user@lucene.apache.org
Betreff: Re: AW: auto completion search with solr using NGrams in SOLR

Hi,

thanks,

im searching with empname filed.  want to search with both "empname" and 
"title". 

below is my changed code.












 

 

SOLR Query :
http://localhost:8080/AC/select/?q=(*am*)&rows=500

1) want to search with "title" and "empname" both. 
2) am i quering correctly with above url ??

but getting result like .

p*am*
s*am*
ra*am*a

but i want the result like 

aman
amar
amal

please help me in this...




--
View this message in context: 
http://lucene.472066.n3.nabble.com/auto-completion-search-with-solr-using-NGrams-in-SOLR-tp3998559p3998721.html
Sent from the Solr - User mailing list archive at Nabble.com.