Suppose I have a special data search type (something different than a string or 
numeric value) that I want to integrate into the Solr server.  For example, 
suppose I wanted to implement a KD-tree as a filter that would integrate with 
standard Solr filters and queries.  I might want to say "find all of the 
documents in the index with the word 'tree' in them that are within a certain 
distance of a particular document in the KD-tree".  Let me add that I'm not 
really looking for a KD-Tree implementation for Solr; I just assume that a fair 
number of people will know what a KD-tree is and so, have some idea that I'm 
talking about adding a new data type (different than string, long, etc.) that 
Solr will need to be able to index and search with.  It's important that the 
new data type should integrate with the existing standard Solr data types for 
searching purposes.

First, is there a way to build and specify a plugin that provides Solr both the 
indexer and search interfaces and therefore hides the internal details of 
what's going on in the search from Solr so it just thinks it's another search 
type?  Or, would I have to hack Solr in a lot of places to add my custom data 
type in?

Second, if the interface(s) exists to add in a new data type, is there 
documentation (tutorial, examples, etc.) anywhere on how to do this.  Or, is my 
only option to dig into the Solr code?

Mostly, I'm looking for some links or suggestions on where to start looking.  I 
doubt this subject is simple enough to fit into an email post (though I'd be 
happy to be surprised :) ).  You can assume Solr 4.0 if that makes things 
easier.  You can also assume that I have some familiarity with Lucene (though I 
haven't hacked that code either).

Hopefully, I've explained this well enough so that people know what I'm looking 
for.

Cheers

Scott

Reply via email to