lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Jelsma <>
Subject RE: PreAnalyzed URP and SchemaRequest API
Date Mon, 09 Apr 2018 13:45:01 GMT
Hello David,

The remote client has everything on the class path but just calling setTokenStream is not
going to work. Remotely, all i get from SchemaRequest API is a AnalyzerDefinition. I haven't
found any Solr code that allows me to transform that directly into an analyzer. If i had that,
it would make things easy.

As far as i see it, i need to reconstruct a real Analyzer using AnalyzerDefinition's information.
It won't be a problem, but it is cumbersome.

Thanks anyway,
-----Original message-----
> From:David Smiley <>
> Sent: Thursday 5th April 2018 19:38
> To:
> Subject: Re: PreAnalyzed URP and SchemaRequest API
> Is this really a problem when you could easily enough create a TextField
> and call setTokenStream?
> Does your remote client have Solr-core and all its dependencies on the
> classpath?   That's one way to do it... and presumably the direction you
> are going because you're asking how to work with PreAnalyzedParser which is
> in solr-core.  *Alternatively*, only bring in Lucene core and construct
> things yourself in the right format.  You could copy PreAnalyzedParser into
> your codebase so that you don't have to reinvent any wheels, even though
> that's awkward.  Perhaps that ought to be in Solrj?  But no we don't want
> SolrJ depending on Lucene-core, though it'd make a fine "optional"
> dependency.
> On Wed, Apr 4, 2018 at 4:53 AM Markus Jelsma <>
> wrote:
> > Hello,
> >
> > We intend to move to PreAnalyzed URP for analysis offloading. Browsing the
> > Javadocs i came across the SchemaRequest API looking for a way to get a
> > Field object remotely, which i seem to need for
> > JsonPreAnalyzedParser.toFormattedString(Field f). But all i can get from
> > SchemaRequest API is FieldTypeRepresentation, which offers me
> > getIndexAnalyzer() but won't allow me to construct a Field object.
> >
> > So, to analyze remotely i do need an index-time analyzer. I can get it,
> > but not turn it into a Field object, which the PreAnalyzedParser for some
> > reason wants.
> >
> > Any hints here? I must be looking the wrong way.
> >
> > Many thanks!
> > Markus
> >
> -- 
> Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
> LinkedIn: | Book:

View raw message