lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: RequestHandler / function Query with Cache-implementation
Date Thu, 06 May 2010 19:02:05 GMT

: Having a look at the source-codes and the API-documentation, I want to
: describe how I would try to implement my function query's prototype.

I would take a step back by trying to use ExternalFileField directly -- 
then if there is something you want to do that is adeviation from it's 
behavior, i would clone it and modify it as needed to get your desired 
goal. (or submit a patch back)

Using a "FieldType" as the "root" for your custom logic is going to be 
easier then just creating an arbitrary new ValueSource, because then you 
won't need a custom function to give you access to it -- you can just take 
advantage of the existing function query ability to access the "indexed" 
value of a field (which for ExternalFileField comes fro mthe file itself)

: How to use it in practice on the client-side after pluged in the functions?

you would register the ExternalFileField (or your custom equivilent) 
in your schema.xml and then query it using hte function syntax refering to 
your special fieldname...

 q={!func}product(100,sub(myExternalFileFieldName,42))

Seriously though: try using ExternalFileField *first* before you write a 
single line of code ... make sure you understand what it does, and how to 
use it, and how you can combine it in other functions purely as a *user* 
-- then worry about customizing the code or rolling your own equivilent.



-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message