Apache solr indexed data not visible even after commit - apache

I am not able to find the indexed data of the files during search
Below are the steps I am following
OS: Windows 7
Solr version: solr 5.2.1
Steps:
cd ..\solr 5.2.1\bin
solr start -e techproducts
Check if solr is up and running and core is visible. Search for the indexed files. Total 32 files exists and shown in the search result .
cd ..\solr-5.2.1\example\exampledocs
curl "http://localhost:8983/solr/techproducts/update/extract?literal.id=33&commit=true" -H "myfile=#example/exampledocs/test.pdf"
Result: It shows successfully indexed and committed but the files returned from the search are still 32 files.
try with other way of indexing ... java -Durl=http://localhost:8983/solr/techproducts/update/extract -Dparams=literal.id=33 -jar post.jar test.pdf It indexed and committed successfully
Open solr GUI and do a search now 33 files returned , but can not see any information of the test.pdf file, meta data and data both not visible
Restart the solr
now we can see the data of the file
Surprisingly instant commit worked for me just a day before with the same configuration, once I did delete all index, from then I am facing this problem not only with this solr instance for other solr instances in the same machine.
Below are the autocommit config from solrconfig.xml
<autoCommit>
<maxTime>${solr.autoCommit.maxTime:15000}</maxTime>
<openSearcher>false</openSearcher>
</autoCommit>
<autoSoftCommit>
<maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime>
</autoSoftCommit>

Related

solr 9 on ubuntu - bad permissions

I'm trying to set up a solr cloud instance on ubuntu and am having this issue (5 years later, under solr 9): solr installation, cannot start examples
The suggested solution (chown solr.solr...) does not work for me, nor can I run solr as root.
As a last resort, I tried forcing solr start as root: bin/solr start -e cloud -force
but it still errors with permissions:
ERROR: Logs directory /opt/solr/example/cloud/node1/solr/../logs could not be created.
Anyone have a solution to this under solr 9?

Schemaless configuration not writing to index

I am somewhat new to Solr and have been trying to follow the example of using the Schemaless configuration. I start up Solr with the following command:
bin/solr start -e schemaless
And solr does start up. I am trying to post an xml document to the schemaless index using the curl command as follows:
curl "http://localhost:8983/solr/gettingstarted/update?commit=true&wt=xml" -H "Content-type:application/xml" -d "xml text goes here"
However, when I run the curl command to view the fields that should have been added to the index, curl http://localhost:8983/solr/gettingstarted/schema/fields , I only see the defaults that existed when first starting up solr.
Is there anything I am missing when starting solr?
Thanks for your help in advance.

Document is missing mandatory uniqueKey field: id while indexing pdf files in Solr 6.2.1 version

I am very new to Solr. I am using Solr 6.2.1 version and working on windows. In that I could be indexed .csv,.json files. But while I am indexing the PDF files I am facing issue like "Document is missing mandatory uniqueKey field: id".
Here I used command for creating Core,
C:\Solr\solr-6.2.1\bin>solr create -c Testcollection -d basic_configs
and command for Indexing pdf ,
C:\Solr\solr-6.2.1\example\exampledocs>java -Dtype=application/pdf -Durl=http://
localhost:8983/solr/Testcollection/update/extract -jar post.jar one_order_model.
pdf
Please suggest me that how can fix this issue.
Thanks in Advance
Nag

How to run scripts automatically after deployment in AWS using EB CLI?

I am trying to make a Django server on AWS. My django app depends on some mathematical python libraries like numpy, scipy, sklearn etc. However there is an issue for which I need to this after every deployment
sudo nano /etc/httpd/conf.d/wsgi.conf
---------------------------------------
add this line in the file
WSGIApplicationGroup %{GLOBAL}
---------------------------------------
sudo /etc/init.d/httpd reload
Basically I need "WSGIApplicationGroup %{GLOBAL}" in my wsgi.conf file otherwise I get 504. I am using a Custom AMI built on top of Amazon Linux 2014 and I am using EB CLI for deployment. However whenever I deploy the wsgi.conf is reset and it does not contain the line that I have added previously and I need to manually SSH into the EC2 instance and do this task myself. It gives a overhead on every deployment and its also not feasible once we scale up (cloning or creating instances also resets it). So is there a way that this will be automatically done after every deployment ?
The content of the wsgi.conf is fixed, so basically I can make a script easily to create it but the issue is how to trigger the script automatically ?
PS:I am new to AWS
You need to use AWS Elastic Beanstalk feature called .ebextensions: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html
In your case you can't use Files or Commands sections, because:
The commands are processed in alphabetical order by name, and they run
before the application and web server are set up and the application
version file is extracted.
You need to use Container_commands section:
They run after the application and web server have been set up and the
application version file has been extracted, but before the
application version is deployed.
Example .ebextensions/01wsgi.config (not tested :-))
container_commands:
apache_reload:
command: |
echo "WSGIApplicationGroup %{GLOBAL}" >> /etc/httpd/conf.d/wsgi.conf
/etc/init.d/httpd reload
Feel free to tweak my example as you want, for example you can copy your temporary wsgi.conf file somewhere and then replace original in Container_commands section.

How to stop the running solr server?

I want to stop Solr server which is been started with below command
$ solr start -e dih
by above command my intention was to launch example DIH application bundled with the package.
Now I want to stop the above server, when I try to stop, I am getting below error:
$ solr stop -p 8984
ERROR: Solr home directory D:\Softwares\solr-5.0.0\ must contain
solr.xml
I am new to Solr.
i had set the SOLR_HOME as solr\bin, but where as per the document , it says
The Solr Home directory typically contains the following...
solr.xml *
so i have set SOLR_HOME to solr\server\solr, where i have solr.xml.
after modifying my home to above path, solr stop starts working