Yeah.. can't release that part mate, all you need is

package com.pjaol;

import org.apache.lucene.queryParser.ParseException;
import org.apache.solr.search.FunctionQParser;
import org.apache.solr.search.ValueSourceParser;
import org.apache.solr.search.function.ValueSource;

public class CustomValueSourceParser extends ValueSourceParser{

    @Override
    public ValueSource parse(FunctionQParser fp) throws ParseException {

        System.out.println("******* Called");
        return null;
    }

}


And
<valueSourceParser name="social_a" class="com.pjaol.CustomValueSourceParser"
/>
in your solrconfig.xml

The parse method only gets called at query time

2009/12/15 Noble Paul നോബിള്‍ नोब्ळ् <noble.p...@corp.aol.com>

> it does not have the code for SocialValueSource..
>
> On Wed, Dec 16, 2009 at 12:18 PM, patrick o'leary <pj...@pjaol.com> wrote:
> > Rather than subject the list to code, it's pasted here
> > http://www.pasteyourcode.com/13969
> >
> >
> > On Tue, Dec 15, 2009 at 10:42 PM, Shalin Shekhar Mangar <
> > shalinman...@gmail.com> wrote:
> >
> >> On Wed, Dec 16, 2009 at 11:58 AM, patrick o'leary <pj...@pjaol.com>
> wrote:
> >>
> >> > SEVERE: java.lang.AbstractMethodError
> >> >    at
> org.apache.solr.core.SolrCore.createInitInstance(SolrCore.java:439)
> >> >    at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:1498)
> >> >    at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:1492)
> >> >    at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:1525)
> >> >    at
> >> >
> org.apache.solr.core.SolrCore.initValueSourceParsers(SolrCore.java:1469)
> >> >    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:549)
> >> >    at
> >> >
> >> >
> >>
> org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:137)
> >> >    at
> >> >
> >>
> org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83)
> >> >    at
> >> org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99)
> >> >
> >> > And
> >> > svn info
> >> > Path: .
> >> > URL: http://svn.apache.org/repos/asf/lucene/solr/trunk
> >> > Repository Root: http://svn.apache.org/repos/asf
> >> > Repository UUID: 13f79535-47bb-0310-9956-ffa450edef68
> >> > Revision: 891117
> >> > Node Kind: directory
> >> > Schedule: normal
> >> > Last Changed Author: koji
> >> > Last Changed Rev: 890798
> >> > Last Changed Date: 2009-12-15 06:13:59 -0800 (Tue, 15 Dec 2009)
> >> >
> >> >
> >> I just wrote a custom ValueSourceParser which does not override the init
> >> method and it loads fine on current trunk. Can you share your code?
> >>
> >> --
> >> Regards,
> >> Shalin Shekhar Mangar.
> >>
> >
>
>
>
> --
> -----------------------------------------------------
> Noble Paul | Systems Architect| AOL | http://aol.com
>

Reply via email to