Have a look at Solr's source code and you will see many TokenFilter 
implementations.  The synonym token filter is the closest to what you want.  

But maybe first - please detail (copy/paste) the exact error you were getting 
in your handler.  It's still not my recommended approach but it sounds like 
you're new to Solr development and need to iron out some issues first. 

   Erik

> On Jul 24, 2016, at 13:20, sara hajili <hajili.s...@gmail.com> wrote:
> 
> How i can implement this as q token filter.?
> I wanna to expand query with wordnet.
> So i try to implement my search handler. In this way i got solrparam. Q
> And send it to wordnet and expand this.
> I write this to mysearch handler. So when user insert a query like q=tree
> and apple.
> I expand this query with orange.
>> On Jul 24, 2016 8:37 PM, "Erik Hatcher" <erik.hatc...@gmail.com> wrote:
>> 
>> My first inclination would be to implement this as a TokenFilter instead.
>> Can you provide some examples of what you want?
>> 
>>> On Jul 24, 2016, at 08:22, sara hajili <hajili.s...@gmail.com> wrote:
>>> 
>>> hi all.
>>> i wanna to expand my queries with wordnet ...
>>> so i try to write my own SearchHandler class."/mysearchHandler"
>>> so i add new requestHandler in solr-config  /mySearchHandler
>>> but i faced with problem. i found some field that they were package
>> access .
>>> so i get access error in run query.(this field does n't have any getter
>> to
>>> use them)
>>> and now my question is what is best approach to expand my queris with
>>> wordnet?
>>> is good to write my own searchHandler?and overwrite it to get my result?
>>> tnx
>> 

Reply via email to