You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by wojtekpia <wo...@hotmail.com> on 2009/09/08 20:40:02 UTC

Passing FuntionQuery string parameters

Hi,

I'm writing a function query to score documents based on Levenshtein
distance from a string. I want my function calls to look like:

lev(myFieldName, 'my string to match')

I'm running into trouble parsing the string I want to match ('my string to
match' above). It looks like all the built in support is for parsing field
names and numeric values. Am I missing the string parsing support, or is it
not there, and if not, why?

Thanks,

Wojtek
-- 
View this message in context: http://www.nabble.com/Passing-FuntionQuery-string-parameters-tp25351825p25351825.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Passing FuntionQuery string parameters

Posted by wojtekpia <wo...@hotmail.com>.
It looks like parseArg was added on Aug 20, 2009. I'm working with slightly
older code. Thanks!


Noble Paul നോബിള്‍  नोब्ळ्-2 wrote:
> 
> did you implement your own ValueSourceParser . the
> FunctionQParser#parseArg() method supports strings
> 
> On Wed, Sep 9, 2009 at 12:10 AM, wojtekpia<wo...@hotmail.com> wrote:
>>
>> Hi,
>>
>> I'm writing a function query to score documents based on Levenshtein
>> distance from a string. I want my function calls to look like:
>>
>> lev(myFieldName, 'my string to match')
>>
>> I'm running into trouble parsing the string I want to match ('my string
>> to
>> match' above). It looks like all the built in support is for parsing
>> field
>> names and numeric values. Am I missing the string parsing support, or is
>> it
>> not there, and if not, why?
>>
>> Thanks,
>>
>> Wojtek
>> --
>> View this message in context:
>> http://www.nabble.com/Passing-FuntionQuery-string-parameters-tp25351825p25351825.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> -----------------------------------------------------
> Noble Paul | Principal Engineer| AOL | http://aol.com
> 
> 

-- 
View this message in context: http://www.nabble.com/Passing-FuntionQuery-string-parameters-tp25351825p25386910.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Passing FuntionQuery string parameters

Posted by Noble Paul നോബിള്‍ नोब्ळ् <no...@corp.aol.com>.
did you implement your own ValueSourceParser . the
FunctionQParser#parseArg() method supports strings

On Wed, Sep 9, 2009 at 12:10 AM, wojtekpia<wo...@hotmail.com> wrote:
>
> Hi,
>
> I'm writing a function query to score documents based on Levenshtein
> distance from a string. I want my function calls to look like:
>
> lev(myFieldName, 'my string to match')
>
> I'm running into trouble parsing the string I want to match ('my string to
> match' above). It looks like all the built in support is for parsing field
> names and numeric values. Am I missing the string parsing support, or is it
> not there, and if not, why?
>
> Thanks,
>
> Wojtek
> --
> View this message in context: http://www.nabble.com/Passing-FuntionQuery-string-parameters-tp25351825p25351825.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>



-- 
-----------------------------------------------------
Noble Paul | Principal Engineer| AOL | http://aol.com