Questions tagged [solr4j]

Solrj is a java client to access solr. It offers a java interface to add, update, and query the solr index. This page describes the use of the SolrJ releases included with Solr 1.4.x releases, with the 1.4.x war files.

SolrJ is an API that makes it easy for Java applications to talk to Solr. SolrJ hides a lot of the details of connecting to Solr and allows your application to interact with Solr with simple high-level methods. It offers a java interface to add, update, and query the solr index.

SolrJ generally maintains backwards compatibility, so you can use a newer SolrJ with an older Solr, or an older SolrJ with a newer Solr.

SolrJ is designed as an extendable framework to pass SolrRequest to the SolrServer and return a SolrResponse.

SolrJ lets you upload content in XML and Binary format. The default is set to be XML.

This page describes the use of the SolrJ releases included with Solr 1.4.x releases, with the 1.4.x war files.

For more details and example, find wiki for SolrJ.

17 questions
6
votes
1 answer

How can I get the size of a Solr document?

I would like to know the size in bytes of individual Solr documents/responses. Is there a straightforward way to figure this out? We are using the solrj java client. I've looked around and have only found ways to determine the size of the index,…
user3246328
  • 61
  • 1
  • 3
2
votes
1 answer

Exception when Indexing Excel's xslx format file through Solr4.7.2

I am getting an exception while indexing excel sheet of xslx extension through Solr4.7.2 Search API. org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet [default] in context with path [/solr] threw exception…
Raichu
  • 237
  • 1
  • 7
  • 20
2
votes
0 answers

Obtaining IndexReader using CloudSolrServer SolrJ 4.4

I want to use FastVectorHiglighter.getBestFragments(...) programatically. In order to do so, i need IndexReader object for specified request. Problem is that i cannot obtain request itself. All that SolrQuery object provides is queryRespose. Tried…
sierus
  • 21
  • 1
1
vote
0 answers

What is the proper way to use SolrCloud from out of k8s cluster?

I'm trying to use solr, which is working on Kubernetes, from out of k8s. Even I use "HttpSolrClient" java client it tries to connect internal k8s solr instance. java.lang.RuntimeException: Tried fetching cluster state using the node names we knew…
necipakca
  • 121
  • 7
1
vote
1 answer

Solr: Query both Parent and Child docs

Using Solr:5.5.3, Java 7. I have to fetch all Item:Cap and Size_s:XL, With facets: COLOR_s and SIZE_s. Here Item is part of Parent Doc and Size is part of Child doc. I have thought of using BlockJoin but i am not able to understand how to Query both…
A Baldino
  • 178
  • 1
  • 11
1
vote
1 answer

Solr suggester in SolrCloud mode

I am running the solr in CloudSolr mode with three shards. The data is already indexed into solr. Now I have configured the solr suggester in solrconfig.xml. This is the configuration from solrconfig file. I am using solr 4.10…
YoungHobbit
  • 13,254
  • 9
  • 50
  • 73
1
vote
0 answers

Single Solrj call for adding and deleting docs

I am using org.apache.solr.client.solrj.impl.HttpSolrServer.HttpSolrServer for calling solr. For sequential delete and add operations , I am hitting solr like solr.addBeans(); solr.deleteByQuery() …
user811602
  • 1,314
  • 2
  • 17
  • 47
1
vote
1 answer

edismax with multiple words for keyword tokenizer splitting on space

There are two fields in my schema: field1 is using keyword tokenizer filter that preserves the tokens as it is (not even dividing on space. I double checked that in analysis tab.) field2 is using WhitespaceTokenizerFactory that breaks the words on…
1
vote
3 answers

Not able to commit documents using CloudSolrServer in SolrCloud

I've recently started exploring SolrCloud and is trying to index documents using CloudSolrServer client. The issue I'm seeing is if I don't fire an explicit commit on CloudSolrServer object, the documents are not getting indexed. Here's my code…
Shamik
  • 1,671
  • 11
  • 36
  • 64
1
vote
1 answer

Solr : Issues with Soft Auto commit (Near Real Time)

Having issues in Soft Auto commit (Near Real Time). Am using solr 4.3 on tomcat . The index size is 10.95 GB. With this configuration it takes more than 60 seconds to return the indexed document. When adding documents to solr and searching after…
Rohit Kumar
  • 119
  • 8
0
votes
0 answers

How to get the default item from solr collapse

I am doing collapse on itemId like - {!collapse field=itemId nullPolicy=expand} . Its working as expected . So when it is doing the collpase it is showing me one result for itemID -123 that is fine , but in my dataset I have a field called…
0
votes
0 answers

Solrj DeleteByQuery is not working

I have spent more than 3 hours of time to fix this issue, but unfortunately i am not able to fix it. Can anyone help me on this ? Here is the exception i am getting while running deletebyQuery using solrj while adding to solr is working. Note :…
Sthita
  • 1,750
  • 2
  • 19
  • 38
0
votes
2 answers

Solr BlockJoin Indexing for Solr 4.10.1

I am trying to index a nested structure as below and having difficulty indexing both with SOlrJ and the DIH. I have battled with this for a while and would really appreciate some help on this. How do i fix this with either SolrJ or DIH.…
0
votes
1 answer

Limit in results(docs) by facet

I want to show max 5 results(docs) from each facets on first page. How can I achieve it in Solr 4.x for e.g I have thousands of matching products(docs) in TV, Music System, Books etc categories. If I search "Music" keyword, I should get max 5…
yadavjpr
  • 36
  • 5
0
votes
1 answer

"size exceeds the configured maximum" error while indexing

I need to index PDF-Files and I was told Solr could do this. So I installed a Solr-Server on Weblogic and tried some things with the Web-Interface. Finally I wrote a JUnit-Test class to try to do the same things with Java and Solrj. I wrote a…
Francesco
  • 2,350
  • 11
  • 36
  • 59
1
2