Getting an ngram fieldtype to work

2010-10-08 Thread Allistair Crossley
Morning all, I would like to ngram a company name field in our index. I have read about the costs of doing so in the great David Smiley Solr 1.4 book and just to get started I have followed his example in setting up an ngram field type as follows: fieldType name=text_substring

Re: Getting an ngram fieldtype to work

2010-10-08 Thread Jan Høydahl / Cominvent
Hi, The first thing I would try is to go to the analysis page, enter your test data, and report back what each analysis stage prints out: http://localhost:8983/solr/admin/analysis.jsp -- Jan Høydahl, search solution architect Cominvent AS - www.cominvent.com On 8. okt. 2010, at 14.19,

Re: Getting an ngram fieldtype to work

2010-10-08 Thread Allistair Crossley
Hi, Yep, I was just looking at the analyzer jsp. The ngrams *do* exist as expected, so it's not my configuration that is at fault (he says) Index Analyzer sh ho oo ot te er sho hoo oot ote ter shoohootooteotershoot hoote

Re: Getting an ngram fieldtype to work

2010-10-08 Thread Markus Jelsma
How come your query analyser spits out grams? It isn't configured to do so or you posted an older field definition. Anyway, do you actually search on your new field? On Friday, October 08, 2010 02:46:08 pm Allistair Crossley wrote: Hi, Yep, I was just looking at the analyzer jsp. The

Re: Getting an ngram fieldtype to work

2010-10-08 Thread Allistair Crossley
Oh my. I am basically being a total monkey. Every time I was changing my schema.xml to try new things out I was then reindexing our staging server's index instead of my local dev index so no changes were occurring locally. Dear me. This is working now, surprise. On Oct 8, 2010, at 8:53 AM,

Re: Getting an ngram fieldtype to work

2010-10-08 Thread Allistair Crossley
Well, a lot of this is working but not all. Consider the company name Shooters Inc My ngram field is able to match queries to the name for shoot and hoot and so on. This works. However consider the company name Location Scotland If I query scot I get one result back - but it's for a company