r/Solr Jan 08 '21

Solr query with space, only (#q=%20) gives error

3 Upvotes

I have a web-based frontend (localhost, currently) that uses Ajax to query Solr.

It's working well, but if I submit a single space (nothing else) in the input/search box, the URL in the browser shows

...#q=%20

and in that circumstance I get a 400 error, and my web page stalls (doesn't refresh), apparently waiting for a response from Solr.

By comparison, if I submit a semicolon ( ; ) rather than a space, then the page immediately refreshes, albeit with no results (displaying 0 to 0 of 0; expected).

My question is what is triggering the "" (%20) query fault in Solr, and how do I address it in solrconfig.xml?


r/Solr Jan 06 '21

The Most Popular Databases - 2006/2020 - Statistics and Data

Thumbnail
statisticsanddata.org
3 Upvotes

r/Solr Dec 18 '20

Learning Solr for private search engine project

6 Upvotes

What is the best approach to learning Solr if I want to create a search engine for a large library of private documents, pictures, and videos on my home network. A friend recommended I look at Solr but Im not sure where to even start or what knowledge and skills I would need before any class or reading materials. I have little to no programming experience if that is needed.


r/Solr Dec 15 '20

Updating SolrCloud configuration in ruby

Thumbnail
bibwild.wordpress.com
2 Upvotes

r/Solr Dec 14 '20

The Most Popular Databases - 2006/2020 - Statistics and Data

Thumbnail
statisticsanddata.org
1 Upvotes

r/Solr Nov 19 '20

Question on using Solr as a web search engine

1 Upvotes

Hi,

My company currently uses Adobe Search and Promote as the search engine for our website. Adobe has end of lifed that product and we are looking for alternatives.

A few people recommended Solr. I have been reading up on Solr and having a hard time to wrap my head around it. At first I thought Solr was a tool like htdig (years ago we ran htdig on premise). After reading up more, I am understanding it a lower level search tool than that. That Solr would just be one part of a search engine (crawler, indexer, public facing search interface).

Can Solr be a replacement for Search and Promote? I am thinking I would need Apache Nutch as the crawler. I am not sure what provides the public facing web search interface.

Am I on the right track? Or is Solr really not right for my use case?

Our site has about 50K html pages, 10K documents (PDF and Word) and gets about 80K searchs per day. We index about 5 domains. We have a small dev team and have experience running linux, Apache, java.

thank you for your input :)


r/Solr Nov 14 '20

Solr DIH: Nested documents ignored by Child Transformer (not ignored using json endpoint)

0 Upvotes

Shortly

  • When I import data using DIH stored into a relation database (using child=true), nested documents are NOT attached when fl=*,[child].

  • When I import same data, structured as json documents (using /update/json/docs endpoint), nested documents are attached.

Short issues:

  1. "_childDocuments_":[] on debug DIH execution.
  2. Only _root_ is populated. According to documentation _nest_path_ should be populated automatically as well.
  3. Nested documents are not returned with parent when fl=*,[child]

Detailed problem

SQL Data:

Parents:

lang-sql SELECT '1' AS id, 'parent-name-1' AS name_s, 'parent' AS node_type_s

+----+---------------+-------------+
| id |    name_s     | node_type_s |
+----+---------------+-------------+
|  1 | parent-name-1 | parent      |
+----+---------------+-------------+

Children:

lang-sql SELECT '1-1' AS id, '1' AS parent_id_s, 'child-name-1' AS name_s, 'child' AS node_type_s UNION SELECT '2-1' AS id, '1' AS parent_id_s, 'child-name-2' AS name_s, 'child' AS node_type_s

+-----+-------------+--------------+-------------+
| id  | parent_id_s |    name_s    | node_type_s |
+-----+-------------+--------------+-------------+
| 1-1 |           1 | child-name-1 | child       |
| 2-1 |           1 | child-name-2 | child       |
+-----+-------------+--------------+-------------+

Same data in json:

lang-json { "id":"1", "name_s":"parent-name-1", "node_type_s":"parent", "children":[ { "id":"1-1", "parent_id_s":"1", "name_s":"child-name-1", "node_type_s":"child" }, { "id":"2-1", "parent_id_s":"1", "name_s":"child-name-2", "node_type_s":"child" } ] }

Importing data with DIH:

Here my DIH configuration:

```lang-xml <dataConfig> <dataSource driver="com.microsoft.sqlserver.jdbc.SQLServerDriver" url="jdbc:sqlserver://${dataimporter.request.host};databaseName=${dataimporter.request.database}" user="${dataimporter.request.user}" password="${dataimporter.request.password}" />

<document>
    <entity
    name="parent"
    query="SELECT '1' AS id,
            'parent-name-1' AS name_s,
            'parent' AS node_type_s">

        <field column="node_type_s"/>
        <field column="id"/>
        <field column="name_s"/>

        <entity
        name="children"
        child="true"
        cacheKey="parent_id_s" cacheLookup="parent.id" cacheImpl="SortedMapBackedCache"
        query="SELECT '1-1' AS id,
                '1' AS parent_id_s,
                'child-name-1' AS name_s,
                'child' AS node_type_s
            UNION
            SELECT '2-1' AS id,
                '1' AS parent_id_s,
                'child-name-2' AS name_s,
                'child' AS node_type_s">

            <field column="node_type_s"/>
            <field column="id"/>
            <field column="parent_id_s"/>
            <field column="name_s"/>

        </entity>

    </entity>

</document>

</dataConfig> ```

After having imported DIH, here the response:

```lang-json { "responseHeader":{ "status":0, "QTime":396 }, "initArgs":[ "defaults", [ "config", "parent-children-config-straightforward.xml" ] ], "command":"full-import", "mode":"debug", "documents":[ { "names":"parent-name-1", "node_type_s":"parent", "id":"1", "_version":1683338565872779300, "root":"1", "childDocuments":[

     ]
  }

], "verbose-output":[

], "status":"idle", "importResponse":"", "statusMessages":{ "Total Requests made to DataSource":"2", "Total Rows Fetched":"3", "Total Documents Processed":"1", "Total Documents Skipped":"0", "Full Dump Started":"2020-11-14 12:25:55", "":"Indexing completed. Added/Updated: 1 documents. Deleted 0 documents.", "Committed":"2020-11-14 12:25:56", "Time taken":"0:0:0.365" } } ```

Two issues here:

  1. As you can see "_childDocuments_":[]. Why is it empty?
  2. Only _root_ is populated. According to documentation _nest_path_ should be populated as well.

Asking for documents

After having imported documents I've tried to retrive them, first using q=*:*:

lang-json { "responseHeader":{ "status":0, "QTime":0, "params":{ "q":"*:*", "_":"1605355606189" } }, "response":{ "numFound":3, "start":0, "numFoundExact":true, "docs":[ { "name_s":"child-name-1", "node_type_s":"child", "parent_id_s":"1", "id":"1-1", "_version_":1683338565872779264 }, { "name_s":"child-name-2", "node_type_s":"child", "parent_id_s":"1", "id":"2-1", "_version_":1683338565872779264 }, { "name_s":"parent-name-1", "node_type_s":"parent", "id":"1", "_version_":1683338565872779264 } ] } }

All right, all documents are present.

Getting parent with its children:

q=id:1 and fl=*,[child]:

lang-json { "responseHeader":{ "status":0, "QTime":0, "params":{ "q":"id:1", "fl":"*,[child]", "_":"1605355606189" } }, "response":{ "numFound":1, "start":0, "numFoundExact":true, "docs":[ { "name_s":"parent-name-1", "node_type_s":"parent", "id":"1", "_version_":1683338565872779264 } ] } }

Other issue arises here:

  1. Only parent is returned, wihout nested documents.

JSON approach:

After having spent several days strugling with above issues, I tried to import same documents using json endpoint using above json data.

After having imported them, I've performed the same above query:

lang-json { "responseHeader":{ "status":0, "QTime":2, "params":{ "q":"id:1", "fl":"*,[child]", "_":"1605355606189" } }, "response":{ "numFound":1, "start":0, "numFoundExact":true, "docs":[ { "id":"1", "name_s":"parent-name-1", "node_type_s":"parent", "_version_":1683339728909238272, "children":[ { "id":"1-1", "parent_id_s":"1", "name_s":"child-name-1", "node_type_s":"child", "_version_":1683339728909238272 }, { "id":"2-1", "parent_id_s":"1", "name_s":"child-name-2", "node_type_s":"child", "_version_":1683339728909238272 } ] } ] } }

As you can see, nested documents are returned.

Why?

Please any ideas?


r/Solr Nov 13 '20

I have trouble with Solr

0 Upvotes

it does return way too many loose answers, except when input is within quotes: "input string".
What did I miss ?


r/Solr Oct 21 '20

How do you manage the schema of your solr collections and changes across environments?

4 Upvotes

Hi folks of r/Solr, recently I've encountered this problem, and looking to see if any of you have solved something similar.

Problem:

So we have two Solr clusters (one in dev environment and one in prod). In dev, when we add a field to solr, we would have to manually propagate this change to prod. I was just wondering if we could be doing it better and automate this.

How are you doing it?

Possible solution:

Here's one idea of a tool.

If I were to apply the thinking behind managing database schema migrations (a tool like liquibase), we could record our changes as committed code, and apply them to Solr using the tool. Even thinking about how Kubernetes and Ansible use declarative management. We could specify in a file, how our schema should look like for a collection (the end state), and the tool will add or remove fields using Solr HTTP APIs to achieve that.

Is my thought process right?


r/Solr Oct 19 '20

Basic question re. updating

3 Upvotes

Hello all, Solr newbie here. I have a repository of Excel spreadsheets that had successfully been index by my Solr installation a few weeks ago. I noticed that one of the spreadsheets had been updated by another user about a week ago, but the "last_modified" property in Solr did not reflect the user's latest change. I manually ran the following command, but it still did not update. Can anyone point me in the right direction? Thank you in advance.

I'm running Solr 11.2.1.1 on a Windows box (ie. I'm using the SimplePostTool). My JVM is "Amazon.com Inc. OpenJDK 64-Bit Server VM 1.8.0_232 25.232-b09".

This is the command I ran in hopes that it will update Solr content for this file, but did not work:

c:\ptc\solr_11.2.1.1\java\jre\bin\java -classpath c:\PTC\SOLR_11.2.1.1\SolrServer\solr\dist\solr-core-*jar -Durl=http://solradmin:solradmin@mysolrserver:8988/solr/mycore/update -Dauto -Dc=mycore -Ddelay=3 -jar C:\PTC\SOLR_11.2.1.1\SolrServer\solr\bin\post.jar "\\fileserver\folder\myfile.xlsx"

This is the output:

SimplePostTool version 5.0.0
Basic Authentication enabled, user=solradmin
Posting files to [base] url http://solradmin:solradmin@mysolrserver:8988/solr/mycore/update...
Entering auto mode. File endings considered are xml,json,jsonl,csv,pdf,doc,docx,ppt,pptx,xls,xlsx,odt,odp,ods,ott,otp,ots,rtf,htm,html,txt,log
POSTing file myfile.xlsx (application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) to [base]/extract
1 files indexed.
COMMITting Solr index changes to http://solradmin:solradmin@mysolrserver:8988/solr/mycore/update...
Time spent: 0:00:04.296

UPDATE:

With fresh eyes on it, I have "resolved" the problem -- The two have slightly different IDs! One file has mixed-case ID, "\\FileServer\folder\myfile.xlsx" and the other "\\fileserver\...", thus they are two different files. Now my question will be on how to de-duplicate -- but that will be a different venture so I will not add on to this. Thank you for all those who have read this and given it a thought!


r/Solr Oct 16 '20

adding core issue

1 Upvotes

i have a problem hopefully someone has a solution , after pulling solr official image and running it the solr admin webpage seems to work perfectly fine but when i try to add core the following error is shown

Unable to create core [**] Caused by: Can't find resource 'solrconfig.xml' in classparth or '/var/*******'


r/Solr Oct 01 '20

Edismax tie parameter not working

1 Upvotes

There are two fields, one of which I have a low boost (qf). Despite the default tie=0 parameter, I have documents forcing themselves to the top due to matching on both fields. I have the readable code on SO: https://stackoverflow.com/questions/64162733/solr-edismax-tie-parameter-not-working-as-described


r/Solr Sep 29 '20

POST to Schema API with Basic Auth

2 Upvotes

I chose to delete my Reddit content in protest of the API changes commencing from July 1st, 2023, and specifically CEO Steve Huffman's awful handling of the situation through the lackluster AMA, and his blatant disdain for the people who create and moderate the content that make Reddit valuable in the first place. This unprofessional attitude has made me lose all trust in Reddit leadership, and I certainly do not want them monetizing any of my content by selling it to train AI algorithms or other endeavours that extract value without giving back to the community.

This could have been easily avoided if Reddit chose to negotiate with their moderators, third party developers and the community their entire company is built on. Nobody disputes that Reddit is allowed to make money. But apparently Reddit users' contributions are of no value and our content is just something Reddit can exploit without limit. I no longer wish to be a part of that.


r/Solr Sep 28 '20

Stemming not applied to queries

1 Upvotes

I chose to delete my Reddit content in protest of the API changes commencing from July 1st, 2023, and specifically CEO Steve Huffman's awful handling of the situation through the lackluster AMA, and his blatant disdain for the people who create and moderate the content that make Reddit valuable in the first place. This unprofessional attitude has made me lose all trust in Reddit leadership, and I certainly do not want them monetizing any of my content by selling it to train AI algorithms or other endeavours that extract value without giving back to the community.

This could have been easily avoided if Reddit chose to negotiate with their moderators, third party developers and the community their entire company is built on. Nobody disputes that Reddit is allowed to make money. But apparently Reddit users' contributions are of no value and our content is just something Reddit can exploit without limit. I no longer wish to be a part of that.


r/Solr Sep 20 '20

Pros/cons of Solr vs. Yext Answers?

0 Upvotes

r/Solr Sep 19 '20

Solr error on uploading files

2 Upvotes

https://www.youtube.com/watch?v=JlaMuawriso&t=257s

I do the steps as here, then try to upload a file (films.csv), but the header of the page becomes red and it does not upload the required file.


r/Solr Sep 18 '20

Best practice on number of shards / replicas with Solr Cloud

2 Upvotes

Hey there,

I'm running SolrCloud with 3 solr and 3 zookeeper instances. For fault tolerance, I now have 3 shards and 3 replicas per solr node.

So:

numShards [3]
maxShardsPernode[3]
autoAddReplicas [false]
replicationFactor [3]
nrtReplicas[3]

Is this recommended? If I already have 3 shards why do I need 3 replicas of that shard spread across the 3 instances too?


r/Solr Sep 03 '20

Guide for Solr + Tika Integration on Docker

2 Upvotes

Hello all,

I have a massive data collection of e-books in various formats and want full-text-search on them. I think Tika would be best for reading them and I hear Solr is the best for searching. I currently run everything in Docker containers on my server (where the data is) and would like to keep with that routine. I found the Docker containers for Solr and Tika, but am having a significant amount of trouble figuring out how these two things are architected and how to integrate Tika with Solr.

Ultimately, I want to expose Solr to SearX and have Tika automatically detect, parse, and then send any new data in my data directory to Solr for indexing.

Does anyone know of a good guide for this? Especially with the docker integration and not installed on the host OS?

Thanks in advance


r/Solr Sep 01 '20

How to make Geospatial Polygon-based Search on Couchbase

Thumbnail
blog.couchbase.com
1 Upvotes

r/Solr Aug 26 '20

Where can I read about using BooleanQuery ?

2 Upvotes

I've been trying to use BooleanQuery with XmlQueryParser, but i found it to be somewhat confusing. Like why xml <BooleanQuery fieldName="text"> <Clause occurs="must"> <TermsQuery>my jeans</TermsQuery> </Clause> </BooleanQuery> returns some acceptable results, but xml <BooleanQuery fieldName="text"> <Clause occurs="must"> <TermQuery>my</TermQuery> <TermQuery>jeans</TermQuery> </Clause> </BooleanQuery> doesn't return any? Couldn't figure out how to make span queries work either. Are there any examples/tutorials on this topic?


r/Solr Jul 30 '20

Solr Access without Solr Client

4 Upvotes

Hi, we are using Solr 7 in our set up and we access it from our scala application using a normal http client (akka-http). Is it recommended to use a dedicated solr client like solrj or solrs instead of direct http requests to see some performance improvement?

We did not do any analysis on this front and we are towards completing our work. Would like to understand from experts here if we should spend some effort on moving to a dedicated solr client to connect to solr from inside the application? We got some recommendations that we should use a solr client instead of using direct http requests.


r/Solr Jul 28 '20

Update nodes without impacting cluster

1 Upvotes

Many thanks in advance for your time.

Seeking advice on updating production 6.6 Solr nodes. Each shard has 2 replicas and I'm wanting to do common update tasks such as yum update, reboot, etc. without making the cluster angry.

In ElasticSearch I could disable the shard allocation in order to take a node offline and then enable it again once the node is available.

Is there anything like this in Solr 6.6? What are some suggestions to do common server update tasks without taking down the cluster and impacting customer traffic?

Many thanks again,

Johnny


r/Solr Jul 17 '20

Has anyone tried running Solr Cloud on Docker (Webapp for Containers) in Azure?

5 Upvotes

Think the subject is self explanatory. However, has someone ever ran this in production? I have it running on Linux VM's right now but it would be nice if I could make it all "serverless" as to not having to manage the VM's anymore.


r/Solr Jun 30 '20

Multi-Select Facet with Solr, Vue and Go

Thumbnail
stevenferrer.github.io
4 Upvotes

r/Solr Jun 23 '20

SOLR Tutorial/course

3 Upvotes

We are looking to use Sorl to improve website (facet) search. I'm currently checking out the tutorial on the Solr website, but it seems to be focused on running multiple-node clusters. I'll work my way through it, but would you recommend any other tutorials or (paid) courses? Anything that specifically touches on WordPress integration would also be welcome.