I just have a couple of small questions. Is there a way to change the path name in the url for searching? I was hoping that was what the file system path is for. Then I can set it to "sites/default/files/lucene" and search with the url "search/lucene/search string" instead of "search/luceneapi_node/search string". But that doesn't seem to work, I guess that's not what it's for.

I was also wondering is it possible to redirect right to a node if the string is contained in the node title. For example, if I have a node titled "Test node" and I type in test node in the search, instead of showing the search results, it'll redirect/bring me straight to the node?

Thanks.

Comments

cpliakas’s picture

Wow. This request obviously got lost in my queue, and I apologize.

Currently Search Lucene API implements the core Search API, so unfortunately he search keys are tied to the path. However, the Search Lucene Views project to help with this once it is released. The setting you changed effects where the Lucene index files are stored on the server.

In terms of your second request, you can most certainly do this. What you would actually want to do is add a submit handler in a custom module that executes a SQL query to test if the search keys are a node title. If there is a match, you can set the $form_state['redirect'] to the path to the node, and you will conserve resources because the redirect to the node will happen before the search is executed.

Again, sorry for the late response and I hope this helps.
~Chris

Platinum’s picture

No problem. Coincidentally the other day I looked at this and I was about to bump this the other day, but in the end decided not to. :p

Thanks for the info on the redirect, I'm not much of a coder, but I'll see if I can figure it out.

cpliakas’s picture

Status: Active » Closed (fixed)

Marking as closed after a long period of inactivity.