Sitecore solr search configuration - solr

We are migrating from lucene search component to solr Search component in sitecore, Some basic configurations are done but still we receive below error:
Method not found: 'Sitecore.ContentSearch.ProviderIndexSearchConfiguration Sitecore.ContentSearch.ContentSearchManager.get_SearchConfiguration()'.

Check, that the databases and paths that are referred to by the index configs (in each core) match the names and paths in your build.
It looks like Sitecore is trying to find the index that covers a particular item but is unable to locate one.
Either that, or the whole config is missing, in which case you have some SOLR config files disabled, or with a file attribute of Hidden, and they aren't being loaded.
Check /sitecore/admin/showConfig.aspx

Related

SOLR - adding custom REST service

I am using SOLR 8.x. and I am trying to adding some custom functionality. Say like, triggering some server specific shell scripts. Adding custom code JARs to the lib folder and adding the jars in solrconfig.xml is not working.
Or how to set up new SOLR version in eclipse(most of the docs online are for older version where SOLR was still a .war)
Any pointers would be much appreciated.
I was able to achieve this by adding the custom jar(HTTPServlet based) to server/lib folder and by updating web.xml with servlet & servlet-mapping.

How to configure retrieving folder once when camel start?

My requirement as below,
Starting camel,then processing all of the files with file component ,which is located some folder once.this route is just used once.
So how to configure with spring DSL?
Thanks advance.
Split your requirement as follow
Starting camel
Your research item, cover this will be off-topic in stackoverflow
processing all of the files with file component
Use file component by from, i.e. from("file://...")
is located some folder once
Set a proper parent directory and then use recursive option in file component to enable sub-directories lookup. For further control, you may check following options minDepth, maxDepth, filterDirectory, filter
this route is just used once
Use repeatCount option in file component to control fire count, i.e. repeatCount=1
Combine them together, you have
from("file://path/to/parent/directory?repeatCount=1&recursive=true")
... // follow by your route logic

Unable to implement a working setup for private images and documents in wagtail

in a wagtail project, I need all image and document file URLs to be "private", e.g. to respect the "privacy setting" of the collection that file/instance belongs to.
Further, these URLs must be private even if the URL is known/guessable.
For wagtail documents, I've found:
https://docs.wagtail.io/en/stable/reference/settings.html?highlight=sendfile#documents
which works.
I've expected a similar setup/reference for wagtail images, but got:
https://docs.wagtail.io/en/stable/advanced_topics/images/image_serve_view.html#advanced-configuration
I did not manage to successfully implement this image_serve_view-sendfile-configuration.
Anyone knows a way to serve wagtail images the same way as wagtail documents (via the simple setting WAGTAILDOCS_SERVE_METHOD?
I'm OK with the StreamingResponse in case django-sendfile is not installed. I just want my wagtail documents AND images to respect the privacy level defined via the collections privacy setting (e.g. "Private, only accessible for logged-in users").
But even with a more elegant and performant solution via django-sendfile (or a more up-to-date and maintained fork like django-sendfile2) I'm missing documentation which details the steps to implement this setup for wagtail documents and wagtail images.
Enforcing privacy for images is not as simple as documents for the reasons described in this issue:
https://github.com/wagtail/wagtail/issues/3880#issuecomment-332798643
That issue has been referenced more recently, so i believe is still the case. It is marked as 'someday' (valid but lower priority).
This is not a full answer, but hopefully helps articulate the problem.

How to sync file system synonym.txt file changes with SOLR UI?

I am trying to reload my core after updating the synonyms.txt file. Ideally, When I save changes in my synonyms.txt file then it should reflect the same changes when I open that file in SOLR UI. Post that I perform a core reload. In my case I am not able to see the file system changes on SOLR UI.
Solr version - 5.3
you mention solrcloud tag, so if you are using solrcloud, you know about uploading conf files to zookeeper etc right?
look for 'upconfig' in this doc

How to see what field is used as router field in an existing Solr collection?

Is it stored anywhere in collection configurations? Seems like it's a rather critical piece of a collection config, still cannot find it anywhere.
this info is stored in zookeeper. Look in /collections/the_collection/state.json and you will see something like:
"router":{"name":"compositeId"},
or similar.
Go to Solr Admin Web UI, Cloud -> Collections -> YourCollectionName -> state.json
If you don't see router.field there, that means it's using unique document key (default setting).

Resources