Questions tagged [spring-data-solr]

Spring Data for Apache Solr is one of the sub-projects of Spring Data oriented towards facilitating the use of the search engine Apache Solr.

Spring Data for Apache Solr is another of the projects included in Spring Data, implmenting the Spring Data repository API to connect with a Apache Solr data store. It uses the same programming model as other Spring Data projects (MongoDB, JPA, Gemfire, NeoJ) and it also contains abstractions to easily bootstrap an embedded Solr server.

Annotations like @Facet, @Highlight and @Boost enable access to Solr specific functionality.

236 questions
3
votes
0 answers

Spring Data solr is creating fieldtype as text_general even though we mention as string

I am trying to integrate Spring Data solr into my spring application and I have strucked with the below problem. Even though I have added the type=string in @Indexed property it is still creating the field type as "text_general". Any…
sree
  • 868
  • 2
  • 12
  • 35
3
votes
1 answer

Migration from solrj to spring-data-solr

Can't find full tutorial for spring-data-solr. Have a question about migrating to spring-data-solr. For example I have the following query on solarj: SolrQuery query = new SolrQuery(); query.setQuery("*:*"); query.setParam("df",…
Tyulpan Tyulpan
  • 724
  • 1
  • 7
  • 17
3
votes
1 answer

Unable to set SolrDocument annotation at RUNTIME

I am using Spring Data Solr and I have the following Solr document model class and have a corresponding SolrCrudRepository for this class @SolrDocument(collection = "oldCollectionName") public class TestDocument { @Id …
user3388770
  • 119
  • 1
  • 11
3
votes
1 answer

Spring Data Solr: Queries with "AND", "NOT" and "OR" not escaped or handled

We are using spring-data-solr, mainly using exact match/equals filter queries. We have found that the values NOT, OR, and AND can be supplied, which are passed directly onto solr (without any pre-processing). This causes solr to error. For example,…
Mike Rocke
  • 600
  • 4
  • 9
3
votes
1 answer

How to log spring data generated solr query on console or in a file

How to log spring data generated solr query on console or in a file. I am using spring-data-solr version 2.0.6.RELEASE from spring boot version 1.4.3.RELEASE. I am trying to log statements in file or console as we are able to do this in…
saket satpute
  • 177
  • 3
  • 13
3
votes
0 answers

Nested documents in Solr using spring data solr

I am trying to use Solr (solr-6.5.1) for storing xml files and need to figure out how to insert it as nested documents using spring data solr (2.1.3). Till now I was not able to find a working example on how to do that. I read Yonik's post on nested…
SBK
  • 113
  • 1
  • 6
3
votes
1 answer

Spring data solr HttpSolrClient does not use core annotation from entity

With a configuration as follows @Configuration @EnableSolrRepositories(basePackages={"com.foo"}, multicoreSupport=true) public class SolrConfig { @Value("${solr.host}") String solrHost; @Bean public SolrClient solrClient() { …
sokie
  • 1,966
  • 22
  • 37
3
votes
1 answer

Spring Boot Solr HighlightPage doesn't return highlighted information

I can't seem to get highlighting to work properly with Spring Boot and the Spring Data Solr package. I'm using Spring Boot 1.4.1. I have public interface BooksRepository extends SolrCrudRepository { @Highlight(prefix =…
Kevin Vasko
  • 1,561
  • 3
  • 22
  • 45
3
votes
1 answer

Nested Documents with spring-data solr

I'm very new to spring-data SOLR and SOLR, so please forgive me some stupid rookie questions. Currently I'm creating a spring-boot 1.4.1.RELEASE application, spring-data solr 2.0.3.RELEASE and solr-solrj 5.5.3 together with Java 8. I'm able to put…
flexguse
  • 479
  • 6
  • 22
3
votes
1 answer

use Spring Data Solr deal with binary field of type byte[]

I'm using spring data solr to index data. When the entity contains field of type byte[], here comes the exception when inserting data into solr. Exception: org.springframework.data.solr.UncategorizedSolrException: ERROR: [doc=a1-t1] Error adding…
Yorick
  • 31
  • 3
3
votes
0 answers

spring-data-solr advanced nested model use case

I was given a task to introduce solr to our product so I thought about spring-data-solr. I have seen this blog: http://www.petrikainulainen.net/spring-data-jpa-tutorial/ and I was able to run embedded solr in integration test. Since I have a simple…
Piotr Tempes
  • 1,091
  • 1
  • 12
  • 26
3
votes
3 answers

Solr query which accepts multiple fileds returns the first non-null value in a list like coalesce in oracle

We have requirement where there are three fields user date, recorded date and encoded date. We use Solr for searching and we have requirement to retrieve records using condition if value exists for user date use it else check for recorded date…
rajadilipkolli
  • 3,475
  • 2
  • 26
  • 49
3
votes
1 answer

How to configure multiple contextfields in single solr suggester?

I am using apache solr to search records in my current application. And I was able to filter the suggesions based on DocumentType by configuring the context field. Now I want to add another context field like departmentType. I am not sure how to…
3
votes
1 answer

How to implement autocomplete using spring data solr

I am using spring data solr for my application and trying to implement autocomplete feature. @SolrDocument public class UserEntity{ @Field private String id; @Field private String fullName; @Field private Date dob; …
3
votes
2 answers

Integration Test with Spring Data SOLR and Transaction Management

I'm trying to write a test case that checks whether a document was pushed into the SOLR index. The problem is, the assertion is failing because the transaction hasn't been committed. The database assertions are fine, they respond with the right…
Richard G
  • 5,243
  • 11
  • 53
  • 95
1
2
3
15 16