You've outlined the possibilities pretty well. I don't think you want a custom analyzer though, consider a custom UpdateHandler and overriding the addDoc command. You can freely manipulate the document at this point, adding or removing fields etc. So see if the incoming doc has your original field or not and add your new boolean field at that point...
Or, even simpler, if you're indexing from SolrJ do this on the client side. Best Erick On Sun, Sep 9, 2012 at 2:53 PM, simple350 <aurel...@yahoo.com> wrote: > Hi, > > I want to be able to select from the index the documents who have a certain > field not null. The problem is that the field is not indexed just stored. > I'm not interested in indexing that field as it is just an internal URL. > > The idea was to add another field to the document - a boolean field - based > on the initial field: 'True' for exiting field, 'False' for null - I could > copy the initial field and use some analyzer having as output a bool result. > > Before trying to build a custom analyzer I wanted to ask if anything like > this makes sense or if it is already available in Solr or if I completely > missed some point. > > Regards, > Alex > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Use-field-as-bool-flag-for-another-not-indexed-field-tp4006491.html > Sent from the Solr - User mailing list archive at Nabble.com.