We have Java-based application using Apache Solr APIS to read data across multiple Cores(Collections) via distributed search https://lucene.apache.org/solr/guide/6_6/distributed-search-with-index-sharding.html
http://localhost:8983/solr/core1/select?shards=solr1:8983/solr/core1,solr2:8983/solr/core1&indent=true&q=ipod+solr
this can be done using java as below
SolrQuery query = new SolrQuery();
query.set("q", "http://localhost:8983/solr/core1/select?shards=solr1:8983/solr/engineers,solr1:8983/solr/designers&indent=true&q=(name:User_Name)");
QueryResponse response = solr.query(query);
SolrDocumentList docList = response.getResults();
the above query would search for the name in two cores engineers and designers.
would it be possible to do the same in Spring Boot?
https://spring.io/projects/spring-data-solr
Related
I want to configure the CosmosQueryRequestOptions.maxDegreeOfParallelism while using the CosmosRepository. I didn't find any documentation around it.
This blog shows how to configure and use this setting through a custom client, but I want to use the repository instead. https://medium.com/#middha.nishant173/improve-query-performance-with-azure-cosmosdb-java-sdk-v4-db1fc54cb484
CosmosQueryRequestOptions is implementation detail for Spring Data Cosmos SDK, so customers cannot set it through spring application.
This can be implemented as a new feature, and can be exposed through application.properties via query.maxDegreeOfParallelism - which customers can opt in if they want.
Default value for maxDegreeOfParallelism is 0, which is the right value for single partition queries. For cross partition queries in the current SDK version, you can get the cosmosClient through spring boot applicationContext and run the query directly against the client. This example shows how to do it - https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/repository/integration/PageableAddressRepositoryIT.java#L144
I am trying to find documentation around creating and searching a text index on redis using Spring Data. I see #Indexed but dont find #TextIndexed like with Spring data MongoDB.
https://github.com/RedisLabs/JRediSearch
There's no Redis module support in Spring Data Redis and we don't plan to add support for Redis modules.
My current project uses spring data couch base 1.2.3 Release version where CouchBaseClient object will be there to retrieve save/get data in key value format from couch base server/cluster/bucket. Now we are planning to upgrade spring data couch base version to 2.x, but CouchBaseClient object has been deleted in 2.x instead bucket/cluster beans are available. Bucket object doesn't have any APIs/methods to save/get data in key value format [ i might be wrong, not sure] so request to help me to find out how to proceed further is there a way in 2.x to store data in key value format?
we have plans to upgrade spring boot version to 1.4.4.release as well so if there are any others ways to interact easily with couch base server, please let me know.
My project env info:
Spring boot 1.2.3
Java 1.8
Thanks,
Satish
This is more a factor of the underlying SDK being of a different generation (2nd generation of Couchbase SDKs, where most methods align in all languages/SDKs and the whole API has been made more coherent).
This generation of SDK exposes objects closer to the reality of the Couchbase cluster: Cluster object to connect to the nodes and perform cluster-wide operations, then Bucket to perform data operations.
Spring Data Couchbase 2.x builds on that. In your configuration you'll choose which Bucket to use (see the docs) and as such you'll also be able to inject that Bucket instance if you really need to.
Note that Spring Data Couchbase offers several layers of abstraction on top of the SDK: repositories for CRUD operations around an entity type, then CouchbaseTemplate that offers individually typed operations but is still capable of marshalling to JSON (the SDK is accessible from CouchbaseTemplate).
On the other hand, with the SDK you have to marshall to JSON yourself, either as a JsonObject map-like structure (default) or a String (in which case you need to store and retreive a RawJsonDocument). Working with these Document types is all explained in the SDK's documentation.
We have a requirement wherein we have to use ElasticSearch for performing full text search. We have a Spring based application and for integration with ES we can use either Java API of Elastic Search or Spring Data for ElasticSearch.
The input will be of a file type having size around 5MB.
I went through examples for both ES Java API and SpringData, they do have
tutorials available for inserting a JSON document.
But any help with regards to using File as an input to create documents/index is not available.
I am newbie with Elastic Search, any guidance/help on this will be much appreciated.
EDIT:
I could see that there is a Ingest Attachment Processor plugin available in ES (https://www.elastic.co/guide/en/elasticsearch/plugins/master/ingest-attachment.html).
Can anybody point me to a sample CURL request to use this plugin or any Java code to use this plugin
1.You may use Elasticsearch mapper attachments plugin. This plugin uses Apache Tika to ingest almost any well known type of document and make it searchable by Elasticsearch.
https://www.elastic.co/guide/en/elasticsearch/plugins/2.3/mapper-attachments.html
2.You can use Apache Tika to extract useful content from file and use elasticsearch Bulk Indexing api to index to ES
Hope that helps
I'm trying to bootstrap an application using Hadoop and Spring (MVC, IOC, Data, Security ). I'm wondering which ORM fits with those technologies.
The Apache Gora open source framework provides an in-memory data model and persistence for big data. Gora supports persisting to column stores, key value stores, document stores and RDBMSs, and analyzing the data with extensive Apache Hadoop™ MapReduce support. - See more at: http://gora.apache.org/#sthash.aHUqfiFl.dpuf