Questions tagged [solrj]

Solrj is a java client to access solr. It offers a java interface to add, update, and query the solr index. SolrJ hides a lot of the details of connecting to Solr and allows your application to interact with Solr with simple high-level methods.

Solrj is also the name of the Java client used to access the Solr server. It offers a Java interface to add, update, and query the Solr index. This way you get everything in a neat little package, and can avoid parsing and working with XML directly.The SolrJ API is included with Solr, so you do not have to download or install anything else. However, in order to build and run applications that use SolrJ, you have to add some libraries to the classpath.

Solr is a standalone enterprise search server with a REST-like API. You put documents in it (called "indexing") via XML, JSON or binary over HTTP. You query it via HTTP GET and receive XML, JSON, or binary results.

Solr is the popular, blazing fast open source enterprise search platform from the Apache Lucene project. Its major features include powerful full-text search, hit highlighting, faceted search, dynamic clustering, database integration, rich document (e.g., Word, PDF) handling, and geospatial search. Solr is highly scalable, providing distributed search and index replication, and it powers the search and navigation features of many of the world's largest internet sites.

Solr is written in Java and runs as a standalone full-text search server within a servlet container such as Tomcat. Solr uses the Lucene Java search library at its core for full-text indexing and search, and has REST-like HTTP/XML and JSON APIs that make it easy to use from virtually any programming language. Solr's powerful external configuration allows it to be tailored to almost any type of application without Java coding, and it has an extensive plugin architecture when more advanced customization is required.

Related Tags:

1614 questions
45
votes
5 answers

Solr/Solrj: How can I determine the total number of documents in an index?

How can I determine the total number of documents in a Solr index using Solrj? After hours of searching on my own, I actually have an answer (given below); I'm only posting this question so others can find the solution more easily.
George Armhold
  • 30,824
  • 50
  • 153
  • 232
37
votes
6 answers

Solr Error This Indexschema is not mutable

I want to use the schema.xml rather than the managed schema so I changed the following in the solrconfig.xml to the below true
Ajay K
  • 436
  • 1
  • 4
  • 10
27
votes
2 answers

solrj api for partial document update

Solr 4 beta is out, the GA version will follow soon. Partial document updates has been around for a while as explained here: http://solr.pl/en/2012/07/09/solr-4-0-partial-documents-update/ However, I haven't figured out how to do it with solrj…
Yoni
  • 10,171
  • 9
  • 55
  • 72
24
votes
3 answers

How to write a solr query for retrieving all records with numeric field value less then specified?

Let's assume we have a set of mp3-players with names and prices. How to write a correct solr query for finding all goods with a certain name and with price less then 100$? q = "(name:(ipod) AND price ???? 100.0)"
Roman
  • 64,384
  • 92
  • 238
  • 332
19
votes
3 answers

How can I get a list of all the cores in a solr server using SolrJ

We are using Solr for our searches, and sharding the data across several cores. We have one core per week of data, so we are dynamically creating and deleting cores each week. How can I query a solr server for a list of all its cores? The JavaDoc…
benhsu
  • 5,346
  • 8
  • 39
  • 47
18
votes
6 answers

Indexing PDF with Solr

Can anyone point me to a tutorial. My main experience with Solr is indexing CSV files. But I cannot find any simple instructions/tutorial to tell me what I need to do to index pdfs. I have seen this:…
Mark
  • 2,522
  • 5
  • 36
  • 42
18
votes
5 answers

Situations to prefer Apache Lucene over Solr?

There are several advantages to use Solr 1.4 (out-of-the-box facetting search, grouping, replication, http administration vs. luke, ...). Even if I embed a search-functionality in my Java application I could use SolrJ to avoid the HTTP trade-off…
Karussell
  • 17,085
  • 16
  • 97
  • 197
17
votes
1 answer

Filtering and sorting using a function in solr

I have documents that look like this: {attr_a: 1}, {attr_a: 2, changes_user1_a: 3} Second document says that user1 made a change that is not yet "committed" and not visible to other users. The fields are dynamic:
calin014
  • 429
  • 1
  • 6
  • 17
16
votes
3 answers

Testing Solr via Embedded Server

I'm coding some tests for my solr-indexer application. Following testing best practices, I want to write code self-dependant, just loading the schema.xml and solrconfig.xml and creating a temporary data tree for the indexing-searching tests. As the…
Lici
  • 998
  • 4
  • 13
  • 22
13
votes
3 answers

Unable to find schema.xml file in solr 6.0,so to configure it,am i supposed to add a new file,or it will happen automatically?

I have created a new core named "testcore" in solR ,but in solR 6.0 I am not able to find Schema.xml file in conf folder,so am I supposed to manually create it or it will configure itself automatically? I wanted to index a example from example…
Rishab Chirania
  • 131
  • 1
  • 1
  • 4
13
votes
2 answers

How to configure Solr for improved indexing speed

I have a client program which generates a 1-50 millions Solr documents and add them to Solr. I'm using ConcurrentUpdateSolrServer for pushing the documents from the client, 1000 documents per request. The documents are relatively small (few small…
Avner Levy
  • 6,601
  • 9
  • 53
  • 92
12
votes
3 answers

Solr Composite Unique key from existing fields in schema

I have an index named LocationIndex in solr with fields as follows:
N D Thokare
  • 1,703
  • 6
  • 35
  • 57
11
votes
2 answers

Too many boolean clauses exception in solr

I am facing these problem while using OR , logical operator in framing query. I dont want to increase the maxBooleanClause value. Is there any other option than this. My OR range can go upto like 2 millions.I would rather want that if range of…
Ankit Ostwal
  • 1,033
  • 3
  • 14
  • 32
10
votes
2 answers

Is there a good tutorial or resource available on SolrJ?

I have been using SolrJ, the Java client for Apache Solr server, at my work. But it is disheartening to see that there are hardly any resources available online for it. Even the wiki on the parent site is kind of a "noob" guide ! There are few…
A Null Pointer
  • 2,261
  • 3
  • 26
  • 28
1
2 3
99 100