How to make browse page load ? I have added handler as given in the page
https://wiki.apache.org/solr/VelocityResponseWriter
Still not working. Can any one brief me on this. Thanks in advance.
Couple of things to check:
Have you restarted Solr?
Is the core you are trying to 'browse' a default core? If not, you need to include the core name in the URL. E.g. /solr/collection1/browse
Are your library statements in solrconfig.xml pointing at the right velocity jar? Use absolute path unless you are very sure that you know what your base directory is for the relative paths
Are you getting any errors in the server logs?
If all fails, start comparing what you have with the collection1 example in Solr distribution. it works there, so you can compare nearly line-by-line the relevant entries and even experiment with collection1 to make it more like your failing example.
Related
I'm having a lot of problems running my solr server. When I have problems committing my csv files (its a 500 MB csv) it throws up some error and I am never able to fix it. Which is why I try to clean up entire indexing using
http://10.96.94.98:8983/solr/gettingstarted/update?stream.body=<delete><query>*:*</query></delete>&commit=true
But sometimes it just doesnt delete. In which casese, I use the
bin/solr stop -all
And then try, but again it gives me some errors for updating. Then I dedicided to extract the install tarball deleteing all my revious solr files. And successfully it works!
I was wondering if there is a shorter way to go about it. I'm sure the index files arn't the only that are generated. Is there any revert to fresh installion option?
If you are calling the update command against the right collection and you are doing commit, you should see the content deleted/reset. If that is not happening, I would check that the server/collection you are querying is actually the same one you are executing your delete command against (here gettingstarted). If that does not work, you may have found a bug. But it is unlikely.
If you really want to delete the collection, you can unload it in the Admin UI's Core page and then delete from the disk. To see where the collection is, look at the core's Overview page on the right hand side. You will see Instance variable with path to your core's directory. It could be for example: .../solr-6.1.0/example/techproducts/solr/techproducts So, deleting that directory after unloading the core will get rid of everything there.
I created a new core in Standalone mode (please, correct me, if I'm saying something wrong). I did it like this (following Apache Solr Reference Guide 5.2):
$ bin/solr create -c test
I hoped to see, that everything (in fact almost nothing) I did goes hand in hand with the Reference Guide. On pages 13 and 14 the Guide clearly describes how the solr home directory should look like:
solr.xml
core_name1/
core.properties
conf/
solrconfig.xml
schema.xml
data/
...
However, when I go to ./server/solr/test/conf I see there 8 files and one directory:
currency.xml
lang/
params.json
solrconfig.xml
synonyms.txt
elevate.xml
managed-schema
protwords.txt
stopwords.txt
Phew... Terrible looking stuff which is not touched at all in the first chapter of the Reference Guide. I do not understad what I did wrong and what made the home directory of a new core look so ugly. I did not have in mind to create any currency.xml and other fancy files. But what looks worst of all is that I can not find any schema file, which judging by the Reference Guide should be the most important. I guess that now I should use managed-schema instead, but when I open it I see a really dreadful message:
<!-- Solr managed schema - automatically generated - DO NOT EDIT -->
Bump! A newbie like me creates a first core in his life, hopes to see a lovely schema file, but finds something that he can not even edit. So, my questions are
how actually to create a core and make hands dirty editing schema.xml file
is it possible to edit somehow managed schema or not
is there any reference guide that can be followed line by line and produce expected results?
The schema.xml is present in solr\configsets\basic_configs\conf location. You can copy it and place it in /conf directory and modify it, to add your fields. This would not affect any other cores.
Also, the other files are needed for how Solr manages the stop works while searching for strings, and currency details etc.
In the documentation of previous versions, these details were mentioned and thats how I figured it out the hard way. If you delete those stopwords and other files, you will eventually find error message that they are missing.
Hope this information helps. Happy learning
To add onto this, in your SolrConfig.xml you can find the schemaFactory tag and change the class attribute from "ManagedIndexSchemaFactory" to "ClassicIndexSchemaFactory". This will make Solr use schema.xml in the cores conf directory instead of generating the managed-schema file.
I have indexed few PDF files in solr. I have used curl command for now. My requirment is that if files are pushed to a perticular directory, those files must be indexed. no manual indexing should be done. When files come, it must be indexed. Is there any way to achieve this ? I am new to Solr. Pls give brief suggestions. Thanks in advance.
I can see 2 options.
Create cron job (or something like that)
Try to use DataImportHandler's scheduler
I would probably lean more towards cron(like) solution 1.
That way after file got indexed it can be moved to separate folder. This is very basic solution, using proper queueing system should give you option to process many files at once.
I currently have a website i'm working on that I have taken over from another individual, I dumped his SQL file into my database and everything seems to be ok apart from one thing. Whenever I try to log in to the back end or if I try to go elsewhere, it will add an additional .co.uk to the address bar, making it like so:
From: www.domain.co.uk to www.domain.co.uk.co.uk
I've had a dig in the database but I really can't find anything and i've never faced this issue before, could anyone shed some light on this for me? Maybe just let me know where I could look within the database to identify the problem, many thanks.
Take a look at the .htaccess file in the root folder, which is hidden and may contain rewrite rules.
Also, I recommend you use this plugin for migrations:
http://wordpress.org/extend/plugins/wp-migrate-db/
I use it whenever I move from localhost to a live site and vice versa. It will also ensure your widgets are preserved, since doing a find replace will cause the object serialisation syntax WordPress uses to break.
After migrating, you need to visit Settings > Permalinks so the .htaccess file can be updated according to the new URL for rewrites.
I need to log Fatal-errors of my website.
I normally check error.log and debug.log files for CakePHP errors.
But I found out that PHP related fatal errors aren't logged someplace.
It is also discussed in this thread.
I checked php.ini. IT has following lines:
log_errors = On
;error_log = filename
I don't have rights to change php.ini. I can ask admin to change this, but it seems like I need to ask him every time I need a change :) I also have concerns about performance. Whether logging errors can decrease performance or not?
So I find out that I can put following two lines inside my script to log errors and change folder or file name when I need.
ini_set("log_errors", 1);
ini_set("error_log", "/path/to/php-error.log");
So I want to know where to put this lines inside my codes? Should I put it inside AppController::beforeFilter ? Or is there a better place/solution in CakePHP 2 configuration?
this is an old thread.
in the meantime with cake 2.x errors are all logged in productive mode - so also fatal errors.
trigger one and check out your /tmp/logs/error.log
but you can easily find that out looking at the core code:
https://github.com/cakephp/cakephp/blob/master/lib/Cake/Error/ErrorHandler.php#L189
There is framework defined configuration settings. You can use the Error Handling configuration class.
Here is changing fatal error behavior link, that will help you to achieve the same.
register_shutdown_function();
http://php.net/manual/en/function.register-shutdown-function.php