Perhaps I'm missing something, but if your fields are indexed as "1234567" but users are searching for "AB1234567," is it not possible simply to strip the prefix from the user's input before sending the request?
On Wed, Jul 20, 2011 at 10:57 AM, Per Newgro <per.new...@gmx.ch> wrote: > Hi, > > i'm new to solr. I built an application using the standard solr 3.3 > examples as default. > My id field is a string and is copied to a solr.TextField ("searchtext") > for search queries. > All works fine except i try to get documents by a special id. > > Let me explain the detail's. Assume id = "1234567". I would like to query > this document > by using q=searchtext:AB1234567. The prefix ("AB") is acting as a pseudo-id > in our > system. Users know and search for it. But it's not findable because > solr-index only knows > the "short id". > > Adding a new document with the prefixed-id as id is not an option. Then i > have to add > many documents. > > For my understanding stemming and ngram tokenizing is not possible > because they act on tokens longer then the search token. > > How can i do this? > > Thanks > Per >