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.count200/str
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 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 xoan...@anlab.info wrote:
 help me!
 i can't find all result.
 str name=spellcheck.count200/str
 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.init(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.init(SolrCore.java:830)
at org.apache.solr.core.SolrCore.init(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 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

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 anna.vakulc...@gmail.com 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: Auto completion

2013-01-18 Thread Erik Hatcher
In the default /browse suggest, it's wired together with the 'name' field in a 
couple of places:

head.vm:
  'terms.fl': 'name',

suggest.vm:
  #foreach($t in $response.response.terms.name)

I'll aim to make this more dynamic in the future, but for now if you're 
adapting from what's there now to use a different field you'll need to hack 
those two spots.  That second spot is simply a path navigation reference in the 
terms component response that puts the field name as one level in the response 
structure.

So in your example, if you wanted to suggest from 'text', substitute 'text' for 
'name' in the spots just mentioned.

Erik



On Jan 11, 2013, at 01:21 , anurag.jain wrote:

 in solrconfig.xml 
 
 
   str name=defTypeedismax/str
   str name=qf
  text^0.5 last_name^1.0 first_name^1.2 course_name^7.0 id^10.0
 branch_name^1.1 hq_passout_year^1.4
  course_type^10.0 institute_name^5.0 qualification_type^5.0
 mail^2.0 state_name^1.0
   /str
   str name=dftext/str
   str name=mm100%/str
   str name=q.alt*:*/str
   str name=rows10/str
   str name=fl*,score/str
 
   str name=mlt.qf
 text^0.5 last_name^1.0 first_name^1.2 course_name^7.0 id^10.0
 branch_name^1.1 hq_passout_year^1.4
  course_type^10.0 institute_name^5.0 qualification_type^5.0
 mail^2.0 state_name^1.0
   /str
   str
 name=mlt.fltext,last_name,first_name,course_name,id,branch_name,hq_passout_year,course_type,institute_name,qualification_type,mail,state_name/str
   int name=mlt.count3/int
 
 
   str name=faceton/str
   str name=facet.fieldis_top_institute/str
   str name=facet.fieldcourse_name/str
 
   str name=facet.rangecgpa/str
   int name=f.cgpa.facet.range.start0/int
   int name=f.cgpa.facet.range.end10/int
   int name=f.cgpa.facet.range.gap2/int
 
 
 
 
 and in schema.xml
 
 
 
   field name=id type=text_general indexed=true stored=true
 required=true multiValued=false / 
   field name=first_name type=text_general indexed=false
 stored=true/
   field name=last_name type=text_general indexed=false
 stored=true/
   field name=institute_name type=text_general indexed=true
 stored=true/
...
...
...
 
 
copyField source=first_name dest=text/
copyField source=last_name dest=text/
 copyField source=institute_name dest=text/
 ...
 ...
 ...
 
 
 so please now tell me what will be JavaScript (terms.fl parameter) ? and
 conf/velocity/head.vm, and also the 'name' reference in suggest.vm. 
 
 
 please reply .. and thanks for previous reply ..  :-)
 
 
 
 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/Auto-completion-tp4032267p4032450.html
 Sent from the Solr - User mailing list archive at Nabble.com.



Re: Auto completion

2013-01-11 Thread anurag.jain
in solrconfig.xml 

 
   str name=defTypeedismax/str
   str name=qf
  text^0.5 last_name^1.0 first_name^1.2 course_name^7.0 id^10.0
branch_name^1.1 hq_passout_year^1.4
  course_type^10.0 institute_name^5.0 qualification_type^5.0
mail^2.0 state_name^1.0
   /str
   str name=dftext/str
   str name=mm100%/str
   str name=q.alt*:*/str
   str name=rows10/str
   str name=fl*,score/str

   str name=mlt.qf
 text^0.5 last_name^1.0 first_name^1.2 course_name^7.0 id^10.0
branch_name^1.1 hq_passout_year^1.4
  course_type^10.0 institute_name^5.0 qualification_type^5.0
mail^2.0 state_name^1.0
   /str
   str
name=mlt.fltext,last_name,first_name,course_name,id,branch_name,hq_passout_year,course_type,institute_name,qualification_type,mail,state_name/str
   int name=mlt.count3/int

   
   str name=faceton/str
   str name=facet.fieldis_top_institute/str
   str name=facet.fieldcourse_name/str
  
   str name=facet.rangecgpa/str
   int name=f.cgpa.facet.range.start0/int
   int name=f.cgpa.facet.range.end10/int
   int name=f.cgpa.facet.range.gap2/int




and in schema.xml



   field name=id type=text_general indexed=true stored=true
required=true multiValued=false / 
   field name=first_name type=text_general indexed=false
stored=true/
   field name=last_name type=text_general indexed=false
stored=true/
   field name=institute_name type=text_general indexed=true
stored=true/
...
...
...


copyField source=first_name dest=text/
copyField source=last_name dest=text/
 copyField source=institute_name dest=text/
 ...
 ...
 ...


so please now tell me what will be JavaScript (terms.fl parameter) ? and
conf/velocity/head.vm, and also the 'name' reference in suggest.vm. 


please reply .. and thanks for previous reply ..  :-)



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


Auto completion

2013-01-10 Thread anurag.jain
Hello,
I am new solr user. i updated schema.xml and solrconfig.xml now in this link 
http://localhost:8983/solr/browse; auto completion is not working :( .
please tell me how should i modify that file so i can do my work(auto
completion). please reply urgent.

thanks   



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


Re: Auto completion

2013-01-10 Thread Erik Hatcher
What modifications did you make?   If you changed the field name (it's 
literally 'name') in the example, you'll need to change the JavaScript 
(terms.fl parameter) in the autocomplete stuff in conf/velocity/head.vm, and 
also the 'name' reference in suggest.vm.  That should be all you need to change 
for that.  

Check your Solr log/console output and see what the actual requests being made 
to Solr are formed as, and give those a try directly through your browser to 
see what is returned to troubleshoot it further.

Erik

On Jan 10, 2013, at 12:23 , anurag.jain wrote:

 Hello,
 I am new solr user. i updated schema.xml and solrconfig.xml now in this link 
 http://localhost:8983/solr/browse; auto completion is not working :( .
 please tell me how should i modify that file so i can do my work(auto
 completion). please reply urgent.
 
 thanks   
 
 
 
 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/Auto-completion-tp4032267.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
--

fieldType name=edgytext class=solr.TextField   
  analyzer  
   tokenizer class=solr.KeywordTokenizerFactory/  
   filter class=solr.LowerCaseFilterFactory/  
  /analyzer  
/fieldType

 field name=title  type=edgytext   indexed=true  stored=true / 
field name=name type=edgytext  indexed=true  stored=true /

field name=autocomplete_text type=edgytext indexed=true
stored=false  multiValued=true omitNorms=true
omitTermFreqAndPositions=false /

copyField source=title dest=autocomplete_text/ 
copyField source=name dest=autocomplete_text/

URL :

http://localhost:8080/solr/terms?*terms.fl=autocomplete_textomitHeader=trueterms.sort=indexterms.prefix=mad*

Response :

?xml version=1.0 encoding=UTF-8 ? 
response
 lst name=terms
lst name=autocomplete_text
*int name=mad - album version1/int 
int name=mad 61/int 
int name=mad about the boy2/int 
int name=mad about the boy - 78rpm version1/int 
int name=mad about the boy - remastered 20021/int   
int name=mad dog - album version1/int *
/lst
 /lst
/response



--
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 bdf=titledefType=lucenefl=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
Hi,

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

1) Remove 

arr name=last-components
  strsuggest/str
  strquery/str
/arr

from your requestHandler.

2) Execute this query URL : suggest/?q=michael bdf=titledefType=lucene

And you will see my point.

--- On Wed, 9/5/12, aniljayanti anil.jaya...@gmail.com wrote:

 From: aniljayanti anil.jaya...@gmail.com
 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
 ---
 
 fieldType name=edgytext class=solr.TextField
 positionIncrementGap=100
 omitNorms=true
     analyzer type=index
           tokenizer
 class=solr.KeywordTokenizerFactory /
           filter
 class=solr.LowerCaseFilterFactory /
           filter
 class=solr.PatternReplaceFilterFactory pattern=\s+
 replacement=  replace=all/
           filter
 class=solr.EdgeNGramFilterFactory minGramSize=1
 maxGramSize=15 side=front /
     /analyzer
     analyzer type=query
          tokenizer
 class=solr.KeywordTokenizerFactory /
          filter
 class=solr.LowerCaseFilterFactory /
          filter
 class=solr.PatternReplaceFilterFactory pattern=\s+
 replacement=  replace=all/
     /analyzer
   /fieldType
 
 
 field name=title        
 type=edgytext     indexed=true
     stored=true /
 field name=empname     type=edgytext
     indexed=true    
 stored=true /
 
 field name=autocomplete_text type=edgytext
 indexed=true
 stored=false  multiValued=true omitNorms=true
 omitTermFreqAndPositions=false /
 
 copyField source=title dest=autocomplete_text/ 
 copyField source=empname
 dest=autocomplete_text/
 *
 solrconfig.xml
 -
 searchComponent class=solr.SpellCheckComponent
 name=suggest
     lst name=spellchecker
       str
 name=namesuggest/str
       str
 name=classnameorg.apache.solr.spelling.suggest.Suggester/str
       str
 name=lookupImplorg.apache.solr.spelling.suggest.fst.FSTLookup/str 
     
       str
 name=storeDirsuggest/str
       str
 name=fieldautocomplete_text/str
       bool
 name=exactMatchFirsttrue/bool
       float
 name=threshold0.005/float
       str
 name=buildOnCommittrue/str
       str
 name=buildOnOptimizetrue/str
     /lst
    lst name=spellchecker
       str
 name=namejarowinkler/str 
       str
 name=fieldlowerfilt/str 
       str
 name=distanceMeasureorg.apache.lucene.search.spell.JaroWinklerDistance/str
 
       str
 name=spellcheckIndexDirspellchecker/str 
    /lst
      str
 name=queryAnalyzerFieldTypeedgytext/str 
   /searchComponent
   
   requestHandler
 class=org.apache.solr.handler.component.SearchHandler
 name=/suggest startup=lazy
 
     lst name=defaults
       str
 name=spellchecktrue/str
       str
 name=spellcheck.dictionarysuggest/str
       str
 name=spellcheck.onlyMorePopulartrue/str
       str
 name=spellcheck.count5/str
       str
 name=spellcheck.collatefalse/str
       str
 name=spellcheck.maxCollations5/str
       str
 name=spellcheck.maxCollationTries1000/str
       str
 name=spellcheck.collateExtendedResultstrue/str
     /lst
     arr name=last-components
       strsuggest/str
       strquery/str
     /arr
   /requestHandler
 
 URL : suggest/?q=michael b
 -
 Response : 
 
 ?xml version=1.0 encoding=UTF-8 ? 
  response
  lst name=responseHeader
   int name=status0/int 
   int name=QTime3/int 
   /lst
   result name=response numFound=0 start=0
 / 
  lst name=spellcheck
  lst name=suggestions
  lst name=michael
   int name=numFound10/int 
   int name=startOffset1/int 
   int name=endOffset8/int 
   arr name=suggestion
   strmichael bully herbig/str 
   strmichael bolton/str 
   strmichael bolton: arias/str 
   strmichael falch/str 
   strmichael holm/str 
   strmichael jackson/str 
   strmichael neale/str 
   strmichael penn/str 
   strmichael salgado/str 
   strmichael w. smith/str 
   /arr
   /lst
  lst name=b
   int name=numFound10/int 
   int name=startOffset9/int 
   int name=endOffset10/int 
   arr name=suggestion
   strb in the mix - the remixes/str 
   strb2k/str 
   strbackstreet boys/str 
   strbackyard babies/str 
   strbanda maguey/str 
   strbarbra streisand/str 
   strbarry manilow/str 
   strbenny goodman/str 
   strbeny more/str 
   strbeyonce/str 
   /arr
   /lst
   str name=collationmichael bully herbig b
 in the mix - the
 remixes/str 
   /lst
   /lst
   /response
 
 
 
 --
 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-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
bdf=titledefType=lucene*) we are specifying the title type search. 

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

lst name=spellcheck
  lst name=suggestions
  lst name=michael
  int name=numFound10/int 
  int name=startOffset1/int 
  int name=endOffset8/int 
  arr name=suggestion
  strmichael/str 
  strmichael/str 
  strmichael /str 
  strmichael j/str 
  strmichael ja/str 
  strmichael jac/str 
  strmichael jack/str 
  strmichael jacks/str 
  strmichael jackso/str 
  strmichael jackson/str 
  /arr
  /lst
  lst name=b
  int name=numFound10/int 
  int name=startOffset9/int 
  int name=endOffset10/int 
  arr name=suggestion
  strb/str 
  strb/str 
  strba/str 
  strbab/str 
  strbar/str 
  strbarb/str 
  strbe/str 
  strben/str 
  strbi/str 
  strbl/str 
  /arr
  /lst
  str name=collationmichael b/str 
  /lst
  /lst

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
 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 bdf=titledefType=lucenefl=title
you will see that your interested will in results section not lst 
name=spellcheck section.

 or title or song...). Here (*suggest/?q=michael
 bdf=titledefType=lucene*) we are specifying the
 title type search. 

q=title:michael b OR empname:michael bfl=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-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 anil.jaya...@gmail.comwrote:

 Hi,

 Thanks,

 As i already used KeywordTokenizerFactory in my earlier posts.

 fieldType name=edgytext class=solr.TextField
 positionIncrementGap=100
 omitNorms=true
 analyzer type=index
   *tokenizer class=solr.KeywordTokenizerFactory /
   filter class=solr.LowerCaseFilterFactory /
   filter class=solr.PatternReplaceFilterFactory pattern=\s+
 replacement=  replace=all/
   filter class=solr.EdgeNGramFilterFactory minGramSize=1
 maxGramSize=15 side=front /
 *   /analyzer
analyzer type=query
  *tokenizer class=solr.KeywordTokenizerFactory /
  filter class=solr.LowerCaseFilterFactory /
  filter class=solr.PatternReplaceFilterFactory pattern=\s+
 replacement=  replace=all/
 *   /analyzer
   /fieldType

 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-04 Thread aniljayanti
Hi,

thanks,

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


schema.xml
---

fieldType name=edgytext class=solr.TextField positionIncrementGap=100
omitNorms=true
analyzer type=index
  tokenizer class=solr.KeywordTokenizerFactory /
  filter class=solr.LowerCaseFilterFactory /
  filter class=solr.PatternReplaceFilterFactory pattern=\s+
replacement=  replace=all/
  filter class=solr.EdgeNGramFilterFactory minGramSize=1
maxGramSize=15 side=front /
/analyzer
analyzer type=query
 tokenizer class=solr.KeywordTokenizerFactory /
 filter class=solr.LowerCaseFilterFactory /
 filter class=solr.PatternReplaceFilterFactory pattern=\s+
replacement=  replace=all/
/analyzer
  /fieldType


field name=title type=edgytext indexed=true  
stored=true /
field name=empname   type=edgytext indexed=true  stored=true /

field name=autocomplete_text type=edgytext indexed=true
stored=false  multiValued=true omitNorms=true
omitTermFreqAndPositions=false /

copyField source=title dest=autocomplete_text/ 
copyField source=empname dest=autocomplete_text/
*
solrconfig.xml
-
searchComponent class=solr.SpellCheckComponent name=suggest
lst name=spellchecker
  str name=namesuggest/str
  str name=classnameorg.apache.solr.spelling.suggest.Suggester/str
  str
name=lookupImplorg.apache.solr.spelling.suggest.fst.FSTLookup/str  
  str name=storeDirsuggest/str
  str name=fieldautocomplete_text/str
  bool name=exactMatchFirsttrue/bool
  float name=threshold0.005/float
  str name=buildOnCommittrue/str
  str name=buildOnOptimizetrue/str
/lst
   lst name=spellchecker
  str name=namejarowinkler/str 
  str name=fieldlowerfilt/str 
  str
name=distanceMeasureorg.apache.lucene.search.spell.JaroWinklerDistance/str 
  str name=spellcheckIndexDirspellchecker/str 
   /lst
 str name=queryAnalyzerFieldTypeedgytext/str 
  /searchComponent
  
  requestHandler class=org.apache.solr.handler.component.SearchHandler
name=/suggest startup=lazy

lst name=defaults
  str name=spellchecktrue/str
  str name=spellcheck.dictionarysuggest/str
  str name=spellcheck.onlyMorePopulartrue/str
  str name=spellcheck.count5/str
  str name=spellcheck.collatefalse/str
  str name=spellcheck.maxCollations5/str
  str name=spellcheck.maxCollationTries1000/str
  str name=spellcheck.collateExtendedResultstrue/str
/lst
arr name=last-components
  strsuggest/str
  strquery/str
/arr
  /requestHandler

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

?xml version=1.0 encoding=UTF-8 ? 
 response
 lst name=responseHeader
  int name=status0/int 
  int name=QTime3/int 
  /lst
  result name=response numFound=0 start=0 / 
 lst name=spellcheck
 lst name=suggestions
 lst name=michael
  int name=numFound10/int 
  int name=startOffset1/int 
  int name=endOffset8/int 
  arr name=suggestion
  strmichael bully herbig/str 
  strmichael bolton/str 
  strmichael bolton: arias/str 
  strmichael falch/str 
  strmichael holm/str 
  strmichael jackson/str 
  strmichael neale/str 
  strmichael penn/str 
  strmichael salgado/str 
  strmichael w. smith/str 
  /arr
  /lst
 lst name=b
  int name=numFound10/int 
  int name=startOffset9/int 
  int name=endOffset10/int 
  arr name=suggestion
  strb in the mix - the remixes/str 
  strb2k/str 
  strbackstreet boys/str 
  strbackyard babies/str 
  strbanda maguey/str 
  strbarbra streisand/str 
  strbarry manilow/str 
  strbenny goodman/str 
  strbeny more/str 
  strbeyonce/str 
  /arr
  /lst
  str name=collationmichael bully herbig b in the mix - the
remixes/str 
  /lst
  /lst
  /response



--
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-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 anil.jaya...@gmail.com wrote:

 From: aniljayanti anil.jaya...@gmail.com
 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.
 
 fieldType name=edgytext class=solr.TextField
 positionIncrementGap=100
 omitNorms=true
         analyzer type=index
       *tokenizer
 class=solr.KeywordTokenizerFactory /
           filter
 class=solr.LowerCaseFilterFactory /
           filter
 class=solr.PatternReplaceFilterFactory pattern=\s+
 replacement=  replace=all/
           filter
 class=solr.EdgeNGramFilterFactory minGramSize=1
 maxGramSize=15 side=front /
 *   /analyzer
    analyzer type=query
          *tokenizer
 class=solr.KeywordTokenizerFactory /
          filter
 class=solr.LowerCaseFilterFactory /
          filter
 class=solr.PatternReplaceFilterFactory pattern=\s+
 replacement=  replace=all/
 *   /analyzer
   /fieldType 
 
 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:

tokenizer class=solr.KeywordTokenizerFactory/

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


On Thu, Aug 30, 2012 at 9:07 PM, aniljayanti anil.jaya...@gmail.com 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-31 Thread aniljayanti
Hi,

Thanks,

As i already used KeywordTokenizerFactory in my earlier posts.

fieldType name=edgytext class=solr.TextField positionIncrementGap=100
omitNorms=true
analyzer type=index
  *tokenizer class=solr.KeywordTokenizerFactory /
  filter class=solr.LowerCaseFilterFactory /
  filter class=solr.PatternReplaceFilterFactory pattern=\s+
replacement=  replace=all/
  filter class=solr.EdgeNGramFilterFactory minGramSize=1
maxGramSize=15 side=front /
*   /analyzer
   analyzer type=query
 *tokenizer class=solr.KeywordTokenizerFactory /
 filter class=solr.LowerCaseFilterFactory /
 filter class=solr.PatternReplaceFilterFactory pattern=\s+
replacement=  replace=all/
*   /analyzer
  /fieldType 

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-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-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 

filter class=solr.EdgeNGramFilterFactory minGramSize=1 maxGramSize=15 
side=front /   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-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 Kiran Jayakumar
You need this for both index and query:

filter class=solr.PatternReplaceFilterFactory pattern=\s+
replacement=  replace=all/

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


On Wed, Aug 29, 2012 at 4:55 AM, aniljayanti anil.jaya...@gmail.com 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,

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

suggest/?q=michael ja
---
fieldType name=edgytext class=solr.TextField positionIncrementGap=100
omitNorms=true
analyzer type=index
  tokenizer class=solr.KeywordTokenizerFactory /
  filter class=solr.LowerCaseFilterFactory /
  filter class=solr.EdgeNGramFilterFactory minGramSize=1
maxGramSize=15 side=front /
  filter class=solr.RemoveDuplicatesTokenFilterFactory/
   /analyzer
   analyzer type=query
 tokenizer class=solr.KeywordTokenizerFactory / 
 filter class=solr.LowerCaseFilterFactory /  
   /analyzer
  /fieldType

Response :

 ?xml version=1.0 encoding=UTF-8 ? 
- response
- lst name=responseHeader
  int name=status0/int 
  int name=QTime1/int 
  /lst
  result name=response numFound=0 start=0 / 
- lst name=spellcheck
- lst name=suggestions
- lst name=michael
  int name=numFound10/int 
  int name=startOffset1/int 
  int name=endOffset8/int 
- arr name=suggestion
  *strmichael bully herbig/str 
  strmichael bolton/str 
  strmichael bolton: arias/str 
  strmichael falch/str 
  strmichael holm/str 
  strmichael jackson/str 
  strmichael neale/str 
  strmichael penn/str 
  strmichael salgado/str 
  strmichael w. smith/str* 
  /arr
  /lst
- lst name=ja
  int name=numFound10/int 
  int name=startOffset9/int 
  int name=endOffset11/int 
- arr name=suggestion
*  strja me tanssimme/str 
  strjacob andersen/str 
  strjacob haugaard/str 
  strjagged edge/str 
  strjaguares/str 
  strjamiroquai/str 
  strjamppa tuominen/str 
  strjane olivor/str 
  strjanis joplin/str 
  strjanne tulkki/str* 
  /arr
  /lst
  str name=collationmichael bully herbig ja me tanssimme/str 
  /lst
  /lst
  /response

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 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 ? 

  fieldType name=edgytext class=solr.TextField
positionIncrementGap=100 omitNorms=true
analyzer type=index
  tokenizer class=solr.KeywordTokenizerFactory /
  filter class=solr.LowerCaseFilterFactory / 

  filter class=solr.RemoveDuplicatesTokenFilterFactory/
  filter class=solr.PatternReplaceFilterFactory pattern=\s+
replacement=  replace=all/
   /analyzer
   analyzer type=query
 tokenizer class=solr.KeywordTokenizerFactory / 
 filter class=solr.LowerCaseFilterFactory /
 filter class=solr.EdgeNGramFilterFactory minGramSize=1
maxGramSize=15 side=front / 
 filter class=solr.PatternReplaceFilterFactory pattern=\s+
replacement=  replace=all/
   /analyzer
  /fieldType

Result :

?xml version=1.0 encoding=UTF-8 ? 
- response
- lst name=responseHeader
  int name=status0/int 
  int name=QTime2/int 
  /lst
  result name=response numFound=0 start=0 / 
- lst name=spellcheck
- lst name=suggestions
- lst name=michael
  int name=numFound10/int 
  int name=startOffset0/int 
  int name=endOffset7/int 
- arr name=suggestion
  *strmichael/str 
  strmichael/str 
  strmichael /str 
  strmichael j/str 
  strmichael ja/str 
  strmichael jac/str 
  strmichael jack/str 
  strmichael jacks/str 
  strmichael jackso/str 
  strmichael jackson/str* 
  /arr
  /lst
- lst name=ja
  int name=numFound10/int 
  int name=startOffset8/int 
  int name=endOffset10/int 
- arr name=suggestion
  *strja/str 
  strja/str 
  strjag/str 
  strjam/str 
  strjami/str 
  strjamp/str 
  strjampp/str 
  strjamppa/str 
  strjamppa/str 
  strjamppa t/str* 
  /arr
  /lst
  str name=collationmichael ja/str 
  /lst
  /lst
  /response

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-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 anil.jaya...@gmail.com wrote:

 From: aniljayanti anil.jaya...@gmail.com
 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.
 
 fieldType name=edgytext class=solr.TextField
 positionIncrementGap=100
 omitNorms=true
     analyzer type=index
       tokenizer
 class=solr.KeywordTokenizerFactory /
       filter
 class=solr.LowerCaseFilterFactory / 
       filter
 class=solr.RemoveDuplicatesTokenFilterFactory/
    /analyzer
    analyzer type=query
      tokenizer
 class=solr.KeywordTokenizerFactory / 
  filter
 class=solr.LowerCaseFilterFactory /
  filter
 class=solr.EdgeNGramFilterFactory minGramSize=1
 maxGramSize=15 side=front
 / 
    /analyzer
   /fieldType
 
 
 field name=title type=edgytext indexed=true
 stored=true
 omitNorms=true omitTermFreqAndPositions=true/
 field name=empname type=edgytext indexed=true
 stored=true
 omitNorms=true omitTermFreqAndPositions=true /
 
 field name=autocomplete_text type=edgytext
 indexed=true
 stored=false  multiValued=true omitNorms=true
 omitTermFreqAndPositions=false /
 
 copyField source=empname
 dest=autocomplete_text/
 copyField source=title dest=autocomplete_text/ 
 **
 URL : http://localhost:8080/test/suggest/?q=michael
 
 Result :
  ?xml version=1.0 encoding=UTF-8 ? 
 - response
 - lst name=responseHeader
   int name=status0/int 
   int name=QTime1/int 
   /lst
   result name=response numFound=0 start=0
 / 
 - lst name=spellcheck
 - lst name=suggestions
 - lst name=michael
   int name=numFound9/int 
   int name=startOffset0/int 
   int name=endOffset7/int 
 - arr name=suggestion
   strmichael bolton/str 
   strmichael foret/str 
   strmichael houser/str 
   strmichael o'brien/str 
   strmichael penn/str 
   strmichael row your boat ashore/str 
   strmichael tilson thomas/str 
   strmichael w. smith/str 
   strmichael w. smith featuring andrae
 crouch/str 
   /arr
   /lst
   str name=collationmichael
 bolton/str 
   /lst
   /lst
   /response
 
 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 :
 
   ?xml version=1.0 encoding=UTF-8 ? 
 - response
 - lst name=responseHeader
   int name=status0/int 
   int name=QTime1/int 
   /lst
   result name=response numFound=0 start=0
 / 
 - lst name=spellcheck
 - lst name=suggestions
 - lst name=michael
   int name=numFound9/int 
   int name=startOffset0/int 
   int name=endOffset7/int 
 - arr name=suggestion
   strmichael bolton/str 
   strmichael foret/str 
   strmichael houser/str 
   strmichael o'brien/str 
   strmichael penn/str 
   strmichael row your boat ashore/str 
   strmichael tilson thomas/str 
   strmichael w. smith/str 
   strmichael w. smith featuring andrae
 crouch/str 
   /arr
   /lst
 - lst name=f
   int name=numFound10/int 
   int name=startOffset8/int 
   int name=endOffset9/int 
 - arr name=suggestion
   strf**k the facts/str 
   strfairest lord jesus/str 
   strfatboy slim/str 
   strffh/str 
   strfiona apple/str 
   strfoo fighters/str 
   strfrank sinatra/str 
   strfrans bauer/str 
   strfranz ferdinand/str 
   strfrançois rauber/str 
   /arr
   /lst
   str name=collationmichael bolton f**k the
 facts/str 
   /lst
   /lst
   /response.
 
 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 Kiran Jayakumar
Since you have tokenizer class=solr.KeywordTokenizerFactory /, 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 anil.jaya...@gmail.com wrote:

 Hi ,

 Thanks for reply,

 Now it's working for me after changing like below.

 fieldType name=edgytext class=solr.TextField
 positionIncrementGap=100
 omitNorms=true
 analyzer type=index
   tokenizer class=solr.KeywordTokenizerFactory /
   filter class=solr.LowerCaseFilterFactory /
   filter class=solr.RemoveDuplicatesTokenFilterFactory/
/analyzer
analyzer type=query
  tokenizer class=solr.KeywordTokenizerFactory /
  filter class=solr.LowerCaseFilterFactory /
  filter class=solr.EdgeNGramFilterFactory minGramSize=1
 maxGramSize=15 side=front /
/analyzer
   /fieldType


 field name=title type=edgytext indexed=true stored=true
 omitNorms=true omitTermFreqAndPositions=true/
 field name=empname type=edgytext indexed=true stored=true
 omitNorms=true omitTermFreqAndPositions=true /

 field name=autocomplete_text type=edgytext indexed=true
 stored=false  multiValued=true omitNorms=true
 omitTermFreqAndPositions=false /

 copyField source=empname dest=autocomplete_text/
 copyField source=title dest=autocomplete_text/
 **
 URL : http://localhost:8080/test/suggest/?q=michael

 Result :
  ?xml version=1.0 encoding=UTF-8 ?
 - response
 - lst name=responseHeader
   int name=status0/int
   int name=QTime1/int
   /lst
   result name=response numFound=0 start=0 /
 - lst name=spellcheck
 - lst name=suggestions
 - lst name=michael
   int name=numFound9/int
   int name=startOffset0/int
   int name=endOffset7/int
 - arr name=suggestion
   strmichael bolton/str
   strmichael foret/str
   strmichael houser/str
   strmichael o'brien/str
   strmichael penn/str
   strmichael row your boat ashore/str
   strmichael tilson thomas/str
   strmichael w. smith/str
   strmichael w. smith featuring andrae crouch/str
   /arr
   /lst
   str name=collationmichael bolton/str
   /lst
   /lst
   /response

 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 :

   ?xml version=1.0 encoding=UTF-8 ?
 - response
 - lst name=responseHeader
   int name=status0/int
   int name=QTime1/int
   /lst
   result name=response numFound=0 start=0 /
 - lst name=spellcheck
 - lst name=suggestions
 - lst name=michael
   int name=numFound9/int
   int name=startOffset0/int
   int name=endOffset7/int
 - arr name=suggestion
   strmichael bolton/str
   strmichael foret/str
   strmichael houser/str
   strmichael o'brien/str
   strmichael penn/str
   strmichael row your boat ashore/str
   strmichael tilson thomas/str
   strmichael w. smith/str
   strmichael w. smith featuring andrae crouch/str
   /arr
   /lst
 - lst name=f
   int name=numFound10/int
   int name=startOffset8/int
   int name=endOffset9/int
 - arr name=suggestion
   strf**k the facts/str
   strfairest lord jesus/str
   strfatboy slim/str
   strffh/str
   strfiona apple/str
   strfoo fighters/str
   strfrank sinatra/str
   strfrans bauer/str
   strfranz ferdinand/str
   strfrançois rauber/str
   /arr
   /lst
   str name=collationmichael bolton f**k the facts/str
   /lst
   /lst
   /response.

 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 anil.jaya...@gmail.com wrote:

 From: aniljayanti anil.jaya...@gmail.com
 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: auto completion search with solr using NGrams in SOLR

2012-08-04 Thread Jan Høydahl
Have a look at my blog post 
http://www.cominvent.com/2012/01/25/super-flexible-autocomplete-with-solr/ for 
a walkthrough of how it could be done, as a separate Solr core.

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

On 1. aug. 2012, at 12:04, aniljayanti wrote:

 I want to implement an auto completion search with solr using NGrams. If the
 user is searching for names of employees, then auto completion should be
 applied. ie., 
 
 if types j then need to show the names starts with j if types ja then
 need to show the names starts with ja if types jac then need to show the
 names starts with jak if types jack then need to show the names starts
 with jack
 
 Below is my configuration settings in schema.xml, Please suggest me if
 anything wrong.
 
 below is my code in schema.xml
 
 fieldType name=edgytext class=solr.TextField
 positionIncrementGap=100
 analyzer type=index
  tokenizer class=solr.KeywordTokenizerFactory / 
  filter class=solr.LowerCaseFilterFactory / 
  filter class=solr.EdgeNGramFilterFactory minGramSize=1
 maxGramSize=15 / 
  /analyzer
 analyzer type=query
  tokenizer class=solr.KeywordTokenizerFactory / 
  filter class=solr.LowerCaseFilterFactory / 
  /analyzer
  /fieldType
 field name=empname type=edgytext indexed=true stored=true /
 field name=autocomplete_text type=edgytext indexed=true stored=true
 omitNorms=true omitTermFreqAndPositions=true / 
 copyField source=empname dest=text / 
 
 when im searching with name mado or madonna getting employees names.But
 when searching with madon not getting any data.
 
 Please help me on this.
 
 
 Thanks in Advance,
 
 Anil.
 
 
 
 
 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/auto-completion-search-with-solr-using-NGrams-in-SOLR-tp3998559.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-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.


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

2012-08-02 Thread aniljayanti
Hi,

thanks,

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

below is my changed code.

fieldType name=edgytext class=solr.TextField
positionIncrementGap=100
analyzer type=index
tokenizer class=solr.LowerCaseTokenizerFactory/
filter class=solr.EdgeNGramFilterFactory minGramSize=1 maxGramSize=15
/
/analyzer
analyzer type=query
tokenizer class=solr.LowerCaseTokenizerFactory/
/analyzer
/fieldType


field name=title type=edgytext indexed=true stored=true
omitNorms=true omitTermFreqAndPositions=true/
field name=empname type=edgytext indexed=true stored=true
omitNorms=true omitTermFreqAndPositions=true /

copyField source=empname dest=text/
copyField source=title dest=text/

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.


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.

fieldType name=edgytext class=solr.TextField
positionIncrementGap=100
analyzer type=index
tokenizer class=solr.LowerCaseTokenizerFactory/
filter class=solr.EdgeNGramFilterFactory minGramSize=1 maxGramSize=15
/
/analyzer
analyzer type=query
tokenizer class=solr.LowerCaseTokenizerFactory/
/analyzer
/fieldType


field name=title type=edgytext indexed=true stored=true
omitNorms=true omitTermFreqAndPositions=true/ field name=empname 
type=edgytext indexed=true stored=true
omitNorms=true omitTermFreqAndPositions=true /

copyField source=empname dest=text/ copyField source=title 
dest=text/

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.


auto completion search with solr using NGrams in SOLR

2012-08-01 Thread aniljayanti
I want to implement an auto completion search with solr using NGrams. If the
user is searching for names of employees, then auto completion should be
applied. ie., 

if types j then need to show the names starts with j if types ja then
need to show the names starts with ja if types jac then need to show the
names starts with jak if types jack then need to show the names starts
with jack

Below is my configuration settings in schema.xml, Please suggest me if
anything wrong.

below is my code in schema.xml

fieldType name=edgytext class=solr.TextField
positionIncrementGap=100
 analyzer type=index
  tokenizer class=solr.KeywordTokenizerFactory / 
  filter class=solr.LowerCaseFilterFactory / 
  filter class=solr.EdgeNGramFilterFactory minGramSize=1
maxGramSize=15 / 
  /analyzer
 analyzer type=query
  tokenizer class=solr.KeywordTokenizerFactory / 
  filter class=solr.LowerCaseFilterFactory / 
  /analyzer
  /fieldType
field name=empname type=edgytext indexed=true stored=true /
field name=autocomplete_text type=edgytext indexed=true stored=true
omitNorms=true omitTermFreqAndPositions=true / 
copyField source=empname dest=text / 

when im searching with name mado or madonna getting employees names.But
when searching with madon not getting any data.

Please help me on this.


Thanks in Advance,

Anil.




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


AW: auto completion search with solr using NGrams in SOLR

2012-08-01 Thread Markus Klose
Your configuration of the fieldtype looks quite ok.

In what field are you searching? text?  empname  ? autocomplete_text?
If you are searching in autocomplete_text  how do you add content to it? Is 
there another copyfield statement? If you are searching in text what 
fieldtype has that field.

You can use the analysis.jsp (linked at the admin console) to check what 
happens with your content at index time and search time and if there is a match.

Viele Grüße aus Augsburg

Markus Klose
SHI Elektronische Medien GmbH 
 

-Ursprüngliche Nachricht-
Von: aniljayanti [mailto:anil.jaya...@gmail.com] 
Gesendet: Mittwoch, 1. August 2012 12:05
An: solr-user@lucene.apache.org
Betreff: auto completion search with solr using NGrams in SOLR

I want to implement an auto completion search with solr using NGrams. If the 
user is searching for names of employees, then auto completion should be 
applied. ie., 

if types j then need to show the names starts with j if types ja then 
need to show the names starts with ja if types jac then need to show the 
names starts with jak if types jack then need to show the names starts with 
jack

Below is my configuration settings in schema.xml, Please suggest me if anything 
wrong.

below is my code in schema.xml

fieldType name=edgytext class=solr.TextField
positionIncrementGap=100
 analyzer type=index
  tokenizer class=solr.KeywordTokenizerFactory /
  filter class=solr.LowerCaseFilterFactory /
  filter class=solr.EdgeNGramFilterFactory minGramSize=1
maxGramSize=15 /
  /analyzer
 analyzer type=query
  tokenizer class=solr.KeywordTokenizerFactory /
  filter class=solr.LowerCaseFilterFactory /
  /analyzer
  /fieldType
field name=empname type=edgytext indexed=true stored=true / field 
name=autocomplete_text type=edgytext indexed=true stored=true
omitNorms=true omitTermFreqAndPositions=true / copyField source=empname 
dest=text / 

when im searching with name mado or madonna getting employees names.But 
when searching with madon not getting any data.

Please help me on this.


Thanks in Advance,

Anil.




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


auto-completion with suggester and spellchecking

2011-05-24 Thread Jean-Claude Dauphin
Hi,
I would like to get  suggestions that correspond  to spelling correction in
case there are typing mistakes in the typed characters. I found a similar
post but with no answer
http://lucene.472066.n3.nabble.com/Solr-suggester-and-spell-checker-td2326907.html


And I have some questions about how to use Solr suggester component for
autocompletion and spellchecking at the same time.

1) Does Solr can use the same spellcheck dictionary (that is based upon the
main index) for autocompletion and spellchecking?

2) In solrconfig.xml, should I configure a suggest search Component AND a
spellcheck component? OR a single search component would be sufficient?
any example of configuration would be appreciated.

3) Which parameters should be used in the query?
I
The following query:

http://localhost:8983/solr/position/suggest?q=ingqt=/suggestonlyMorePopular=true
returns no suggestions in case of typing mistake.

Thank you in advance for yr time

Best wishes


-- 
Jean-Claude Dauphin

jc.daup...@gmail.com
jc.daup...@afus.unesco.org

http://kenai.com/projects/j-isis/
http://www.unesco.org/isis/
http://www.unesco.org/idams/
http://www.greenstone.org


auto-completion preview?

2009-11-23 Thread Paul Libbrecht


Hello Solr users,

is there a live demo of the auto-completion feature somewhere?

thanks in advance

paul


Re: auto-completion preview?

2009-11-23 Thread Shalin Shekhar Mangar
On Tue, Nov 24, 2009 at 10:39 AM, Paul Libbrecht p...@activemath.orgwrote:


 Hello Solr users,

 is there a live demo of the auto-completion feature somewhere?

 thanks in advance


Well, there is no preview but I can give you a couple of live instances:

   1. http://autos.aol.com/
   2. http://travel.aol.com/

Try typing something into the top most search box.

-- 
Regards,
Shalin Shekhar Mangar.