EdgeNGramTokenizer not working

2012-01-20 Thread mmg
Hi,

I'm trying to define an EdgeNGram field but for some reason it doesn't work.
My fieldType definition is:















I then use this fieldType in a field called "name":


I have a couple of other fields, which are all copied to a field called
"text":

 text
 
   
   
   
   

Is it because I'm using this mutiValued "text" field that the
EdgeNGramTokenizer doesn't work? I have a name called "test". When I search
for "test" it returns the result, but when I search for "tes" it doesn't. I
already did a full re-index.

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


Re: EdgeNGramTokenizer not working

2012-01-20 Thread mmg
Thank you for your reply. I think that's probably the problem then. Is there
any way I can do this:
I have a list of programs. Each program has a name, keywords, description
and username. When I perform a search, I need to search all of those fields
at once. This is why I used a copyfield to copy everything to a "text"
field. Now there is an additional requirement: partial text searches, but
only for the name field. Is there any way this can be done? I use solrJ for
my queries, as follows:

SolrQuery query = new SolrQuery(keyword);
QueryResponse response = solrServer.query(query);
SolrDocumentList documents = response.getResults();

Thanks

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


Re: EdgeNGramTokenizer not working

2012-01-20 Thread mmg
That looks like a good solution. I'm pretty new with Solr, so I'm not sure
how I should implement it. I looked at the documentation and I *think* I
need to modify the search requestHandler in the solrconfi.xml file, is this
correct? If I define it like this:


   explicit
   10
   edismax
   name keywords description username


should it work using solrJ? Do I have to remove the line:
text
from my schema.xml file?

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


Re: EdgeNGramTokenizer not working

2012-01-20 Thread mmg
Thanks a lot for your help. I'll try it out. I didn't see a defType on the
SolrQuery object, this is why I tought it had to be set in the config. Or is
queryType the same as defType?

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