lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: Solrj supporting term vector component ?
Date Fri, 04 Dec 2020 13:19:19 GMT
To expand on Shawn’s comment. There are a lot of built-in helper methods in SolrJ, but
they all amount to setting a value in the underlying map of params, which you can
do yourself for any parameter you could specify on a URL or cURL command.

For instance, SolrQuery.setStart(start) is just:

this.set(CommonParams.START, start);

and this.set just puts CommonParams.START, start into the underlying parameter map.

I’m simplifying some here since the helper methods do some safety checking and
the like, but the take-away is “anything you can set on a URL or specify
in a cURL command can be specified in SolrJ by setting the parameter explicitly”.

Best,
Erick

> On Dec 3, 2020, at 1:24 PM, Shawn Heisey <apache@elyograg.org> wrote:
> 
> On 12/3/2020 10:20 AM, Deepu wrote:
>> I am planning to use Term vector component for one of the use cases, as per
>> below solr documentation link solrj not supporting Term Vector Component,
>> do you have any other suggestions to use TVC in java application?
>> https://lucene.apache.org/solr/guide/8_4/the-term-vector-component.html#solrj-and-the-term-vector-component
> 
> SolrJ will support just about any query you might care to send, you just have to give
it all the required parameters when building the request. All the results will be available,
though you'll almost certainly have to provide code yourself that rips apart the NamedList
into usable info.
> 
> What is being said in the documentation is that there are not any special objects or
methods for doing term vector queries.  It's not saying that it can't be done.
> 
> Thanks,
> Shawn


Mime
View raw message