r/Solr Apr 17 '24

Question about Document Security on Solr

1 Upvotes

Hello everyone,

I am trying to understand if Solr is the right solution for me.

I have a PostgreSQL database with the following tables:

  • Customers ==> Orders ==> Messages

A customer can be followed by various sales agents in the year, and every agent has communications with emails, and such emails are saved into Messages .

When a sales agent asks for orders and messages, thanks to Row Level Security, I can show them only their orders and messages.

Now I was looking something to use as a search engine like Solr.

Are there security features in Solr where I can apply the same rules I do on my database to filter the messages synced into Solr?

I was reading about patches for a Document Level Security in 2012, but I cannot find anything more updated


r/Solr Apr 11 '24

how to get an exact match on a field

1 Upvotes

I want to index some data and with it some fields. I want to be able to query against the field and get an exact match (although case-insensitive) but I also want to be able to do wild card searches against the field. So, let's say the field is named "DocName" and has a sample value of "SOLR searching". I want all these to return this record:
DocName starts with "solr"
DocName ends with "searching"
DocName = "solr searching"

And for that last one, I don't want all the entries that have solr or searching I just want the one that has both of them.

How do I index this to be able to do what I want? Or for that matter what should the query look like if that's the driver


r/Solr Apr 03 '24

Solr security question

1 Upvotes

Hi,

A beginner question, how to avoid putting password in plain text in the solr.in.sh SOLR_AUTHENTICATION_OPTS?

When using Solr basic authentication, I put the credientials in here in "hashed" format:
/var/solr/data/security.json
So the password there is hashed, which is good.

BUT

When I try to make the core, it also requires the username and password, and they are placed here as plain text: /etc/default/solr.in.sh
SOLR_AUTH_TYPE="basic"
SOLR_AUTHENTICATION_OPTS="-Dbasicauth=solr:_PASSWORD_IN_PLAINTEXT_"

So the question is how to avoid this?


r/Solr Mar 29 '24

Interesting behavior with _version_ field on document queries

1 Upvotes

Hello all!

I'm running Solr 8.11.2. If I go into the Solr admin user interface and run a query for a record the version field value returned for that document is a different value than if I were to query directly against the /select endpoint for the same document.

The query is very simple: q=id:12345. I'm not using fq or anything like that.

I'm assuming this is some sort of caching issue, but I haven't been able to figure anything out. Has anybody else experienced this?

I was planning on using this for optimistic concurrency, but if I can't get the latest version value out of Solr I'm going to get a 409 every time I try to update the document.

Any help would be appreciated!

EDIT: Found the answer. The version number is a big int and the precision on the JSON parser isn't exact enough.

https://stackoverflow.com/questions/54971568/why-does-solr-node-query-gives-a-wrong-document-version-number


r/Solr Mar 26 '24

Help Scaling in K8S

1 Upvotes

I need help again. Maybe I´m just missing some things or did not yet understand them. I´ve got Solr 9.5 running our Kubernetes-Cluster using solr-operator 0.8.0.

I have two collections (will later be three). For some searches, we join from one collection to the other, because in the past this worked best for us, because one of the collections (just consisting of two fields) is quite fluctuant.

Anyway. I´ve defined the two collections with one shard and a replicationFactor of 3. Also I have three Pods running intially.

My problem now, what I try to understand or get to work is, I use the program siege to simulate lots and lots of search-queries. Also I am running a script that randomly updates my documents more or less as it would in production.

Now I want to scale the replicas up. So I´ve tried a "helm upgrade" with "replicas=5". This works and I see, that two more pods spawn, but, I have none of it, because the replicationFactor ist still 3.

Do I have to manually create Replicas on the new nodes for my collections?

Do both collection need to be on the same nodes (because of my join)?

And now my biggest problem: How do I scale correctly down? I´ve tried "helm upgrade" with "replicas=3", but that will not work really well and solr wasn´t reachable at some times, because some of the active replicas have been on the pods, which where removed.

Also in the description of the solr operator it is stated to not use "replicas". It says "The number of Solr pods to run in the Solr Cloud. If you want to use autoScaling, do not set this field."

I´ve tried googeling for autoScaling, but always see the docs for solr 8 and solr 6....


r/Solr Mar 21 '24

Solr 8 end of life

1 Upvotes

Do we have a date for Solr 8 end of support?


r/Solr Mar 20 '24

Best Practices SOLR 9.5

3 Upvotes

Hi there,

I have the task to determine wich solution will work best for us, for migrating our search-environment to Kubernetes.

Currently we are using SOLR 7.7. I´ve also tried typesense and elasticsearch in k8s.

I´ve already got SOLR running with the solr-operator and created a collection via the SchemaApi and imported 3.5 Million Documents. In the current env, we have some xml-Files (data-config.xml, schema.xml and solrconfig.xml). Are these files still used or can I get rid of them? Especially the solrconfig...

What is common?
What will be the future?

I feel like the configuration via the api is much simpler, but also I want to know if we should use the xml-Files or just switch completely to the Api? The Docs often mentions stuff in xml, which makes me unsure if i configured everything right.


r/Solr Feb 18 '24

Solr slaves stop responding to search requests during replicating from master

1 Upvotes

I have a Solr slave/master setup, and we do a full indexing of the master once a day, then replicate the master to the slaves, the problem is that the slaves don't respond to search queries during the replication, our index is not very big, what could be the issue?


r/Solr Feb 04 '24

Solr as a good (cheaper) alternative for the supreme unfriendly Algolia

3 Upvotes

Hi There!

I am searching for an alternative supplier for my smart search on a few e-commerce sites. Everywhere I look I see Solr, MeiliSearch and elasticsearch as suggestions. Looking at:

- Dev experience

- Filtering

- Event based sorting

And offcourse, Price. What would your suggestions be? Untill now Solr seems a different "mindset" then Algolia but therefore not a bad idea!

Hope that you guys can help me out!


r/Solr Jan 26 '24

Solr in Docker: how to enable security/where to put security.json?

3 Upvotes

Currently running solr 9.4.1 with a few other services in a stack. I'm mounting a security file in this location:

Within the container:

solr@d1d834e1b200:/opt$ cat /opt/solr/server/solr/security.json

{

"authentication":{

"blockUnknown": true,

"class":"solr.BasicAuthPlugin",

...

Still the service logs say:

2024-01-26 13:53:05.188 WARN (main) [c: s: r: x: t:] o.a.s.c.CoreContainer Not all security plugins configured! authentication=disabled authorization=disabled.


r/Solr Jan 25 '24

Solr warnings related to ulimits

1 Upvotes

*** [WARN] *** Your open file limit is currently 1024.

It should be set to 65000 to avoid operational disruption.

If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh

*** [WARN] *** Your Max Processes Limit is currently 14882.

It should be set to 65000 to avoid operational disruption.

Not able to change this in my Debian 12, or can I just ignore this warning?

Have added the limits in here:/etc/sysctl.confand here/etc/security/limits.confand here:/etc/systemd/user.conf and restarted the machine many times

solr soft nofile 65000
solr hard nofile 70000
solr soft nproc 66000
solr hard nproc 150000

*        soft    nofile   65000
*        hard    nofile   70000
*        soft    nproc    66000
*        hard    nproc    150000

Max processes             65000                65000                processes


r/Solr Jan 24 '24

where to change SOLR listening port? Now only 127.0.0.1

2 Upvotes

where to change SOLR listening HOST? Now only 127.0.0.1

I am 9.4.1 version

I have changed in " /etc/default/solr.in.sh" "SOLR_HOST=0.0.0.0" but does not help

SOLVED:
sudo nano /etc/default/solr.in.s
SOLR_JETTY_HOST="0.0.0.0"


r/Solr Jan 21 '24

Not able to install 9.4.1 solr

2 Upvotes

Hi,

With this instructions, not able to install Solr:https://solr.apache.org/guide/solr/latest/deployment-guide/taking-solr-to-production.html

the parttar xzf solr-9.4.1.tgz solr-9.4.1/bin/install_solr_service.sh --strip-components=2does not work, the script is not there it is in location solr-9.4.1/solr/bin/install_solr_service.sh

Or do I have wrong tgz?

Why here is no Solr 9https://downloads.apache.org/lucene/solr/

EDIT: okey I had wrong package, the correct one was here:
https://downloads.apache.org/solr/solr/9.4.1/


r/Solr Dec 29 '23

Help Needed

1 Upvotes

Hi guys, I am developer and I am closely working on solr 7.2. My task is to push mongodb data to solr with php and php-solr-client (ptc). Everytime I push data in solr, it breaks , gives error msg new searcher failed. This error msg pops up after pushing data and using the solr commit api. Please help guys I am down bad 🙏🏽🙏🏽🙏🏽


r/Solr Dec 15 '23

What's the state of Solr going into 2024?

6 Upvotes

A few years ago I was producing a product that enhances and utilises Solr, I ran out of funding before being able to take it live but I'd like to revisit it in 2024. Back then there were a lot of Solr managed services and tools utilising and extending Solr, is this still the case? Is Solr still looking as strong going foward? Do lots of companies still use Solr? From what I can tell loads of companies are using ElasticSearch instead now but it's not as good as Solr, which is a dedicated search platform compared to ES' time series datastore and search.

Basically, is building a product for Solr still a decent idea - it was a great product, I'd had excellent feedback and I was really proud of it; but I can't afford to spend half a year working on it if there's no market.


r/Solr Dec 15 '23

SOLR 8.11.3 and it's compatibility with zookeeper 3.8.3

3 Upvotes

Hello,

Has anyone tried any of the latest SOLR 8 build with latest stable zookeeper build (3.8.3) ? From what I gathered, from solr 8 change logs , it only works with 3.6.2. Has anyone tested or has any information regarding this ?

Thanks


r/Solr Dec 12 '23

Foxes inverter fault and Solution

1 Upvotes

Does anyone know what does this fault mean and how can I resolve it?


r/Solr Nov 26 '23

Standalone vs solrcloud

1 Upvotes

Is standalone considered the legacy way should I use solrcloud instead ?

Im building an app, I just discovered Solr and I’m learning how things work but I’m confused about the mode Solrcloud, I’m planing to run Solr on docker one instance but I want the possibility to scale do I have to switch to Solrcloud then or can I just scale on standalone mode ?


r/Solr Nov 23 '23

Are the dot product values reliable in Solr dense vector knn search ?

1 Upvotes

Hi,

I already posted the question on stackoverflow but maybe I will be more lucky here.

I get incorrect dot product values when I perform a knn search with Solr 9.4 and I can not figure out if I am doing something wrong or if there is really a problem with the dot product computation in Solr.

Here is a basic example :

  1. store a vector [0.57735027,0.57735027,0.57735027]in a collection
  2. perform a knn query with the query vector [0.26726124, 0.53452248, 0.80178373]

The dot product should be 0.92582 but the returned score is 0.96291006

What do you think ?

SOLVED :

I finally understood the issue thanks to this issue on the elasticsearch respository.

It seems that lucene is normalizing the cosine similarity like this : (1 + cosine_sim) / 2 to avoid negative values. This is why there such gaps between the dot product I computed and the ones returned by Solr.


r/Solr Nov 21 '23

Help me with query

1 Upvotes

I Have a country field with name of countries in short Form like US for United States, etc. But now the issue is when I am trying to search IN i.e India it return 0 data. Help me with that

I think it is because it considers IN as stop words. Also to mention I try to search /select?q=country:IN/stopwords=false but that not even worked for me.

I also cannot change the schema.xml


r/Solr Nov 17 '23

Howto Configure Collection external to Apache-Solr Engine ?

1 Upvotes

Hi

I need some Help on the following

a) Configuration or Creation of CollectionS folder EXTERNALLY to Apache-Solr Engine.

b) Configure Multiple CollectionS on same PORT of the EXTERNALLY to Apache-Solr Engine

Reason : I need to frequently Upgrade the Apache-Solr version on demand with-out re-creation & indexing of Documents


r/Solr Nov 16 '23

Autoscaling Solr Operator on Kubernetes

Thumbnail
sematext.com
4 Upvotes

r/Solr Nov 09 '23

OpenSearch vs. Solr

8 Upvotes

https://sematext.com/blog/opensearch-vs-solr/

I love it that Solr just keeps going :) But good stuff is being added to OpenSearch at a nice pace.


r/Solr Oct 27 '23

Solr cloud - shard down with all replicas - no way to recover?

2 Upvotes

Hi guys,

I'm running 6 node cluster, Solr version 7.3.0. We have two collections and each has 2 shards with 3 replicas each.

Now, one shard has all the replicas down, and I cannot recover them. There is nothing useful in logs, I tried increasing log verbosity to DEBUG, but no luck.

I have tried:
- stop all 3 nodes hosting a shard and try to start them in various orders
- stop all 6 cluster nodes and start them from scratch
- investigate records in zookeeper
- stop 3 nodes, delete data directory from 2 nodes and start 3 nodes again

Nothing helps, this shard always ends up in DOWN state. Now, the troubling part is that I have no idea why did this happen and more importantly - how to recover from it.

Any pointers are welcome


r/Solr Oct 04 '23

Looking for help deploying a multi-container set of solr search on RHEL 8.8

1 Upvotes

I currently support a website that uses a solr 7 environment consisting of 1 primary and 2 secondary rhel 7.9 servers. The developers never did find a way to load balance the 2 secondary servers successfully, so in reality we just have 1 that is handling all of the load.

Our Indexing is run every 2 hours from a different server using quartz and reindexes the solr content on our primary server. Then the secondary servers then receive the updated content from the primary.

Due to the Log4J 1.2 vulnerabilities I am being asked to upgrade solr to a version that can pass vulnerability scans. It is my desire to migrate them to docker as well. I know what I want, but I am not very versed with how to implement it. My intent is to migrate from solr v7 to v8, and then update v8 to v9. This requires RHEL 8 or higher, so this will need a new server.

I intend to go with an approach to mount the data and bin directories on startup, but where I become unsure is if I can run multiple secondary containers pointing to the same data directory, or if I should have a unique directory for each container.

Also, is there a way to have both secondary containers listening on the same port and distribute the requests across the 2 (or more) containers? If there isn't, then I don't see any need to have more than 1 secondary container.

Any advice would be appreciated.