Closed (fixed)
Project:
Search Lucene API
Version:
6.x-2.x-dev
Component:
Documentation
Priority:
Critical
Category:
Task
Assigned:
Reporter:
Created:
22 Jun 2009 at 15:48 UTC
Updated:
12 Jul 2010 at 16:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
cpliakas commentedMassive documentation effort underway. First drafts of the following sections have been written:
Comment #2
cpliakas commentedPDF snapshot of documentation.
Comment #3
shunting commentedWill one cron run be enough to create the entire new lucene index? If not, you might wish to add verbiage like: "Administrators for large sites, especially those who have "hijacked" Drupal's existing Search form*, may wish to increase the frequency of their cron jobs until the site is completely re-indexed."
* And who wouldn't want to do that?
Comment #4
cpliakas commentedGreat recommendation. Although this may seem intuitive to some, the documentation is geared towards people who may not have as deep of an understanding as more experienced users. I will most definitely add this.
Comment #5
shunting commentedI don't get why the luceneapi_node_luceneapi_facet function constructs its return values the way that it does. Quoting the function in relevant part:
What's with the numeric keys incremented by five? If the numbers aren't meaningful, why not just push values onto the returned array? And if they are meaningful, could they be CONSTANTs? And if something clever is being done with them, maybe it's too clever?
Comment #6
cpliakas commentedPlease see comment in #502498 regarding this issue.
Comment #7
cpliakas commentedAdded documentation to the handbook on drupal.org. All future documentation will be added there.
Comment #8
B Musical commentedHi cpliakas,
Thanks for authoring lucene api module... A few example on how to add field and on how to insert algorithm to configure doc scores (API 2 version) would be really helpful for novice like me to digest.. I tried the following hook implementation checking one of your reply..
Other than the 'id' remaining fields aren't retrieving any results... for example "id:123456" works but "prevproj:insurance" ain't..
i'm quite new to drupal.. Sorry if i had posted this in the wrong place....
Comment #9
cpliakas commentedHi B Musical.
For all fields other than "id", change the second parameter from "keyword" to "unstored". Visit the Understanding field types section of the Zend Framework documentation to get more details on what these values mean.
Thanks for the examples!
~Chris
Comment #10
B Musical commentedThanks a Ton for the quick response.. My issue was resolved... I'm just starting to realize the potential of lucene and once again i like to thank you for authoring this API.. once my knowledge is upgraded I take a oath that i will repay your help by contributing the best of mine to this module...
Regards,
bharani
Comment #11
Anonymous (not verified) commentedSubscribe
Comment #12
Anonymous (not verified) commentedHello Chris,
I'm happy with the faceted indexing on that this module provides but I am struggling to implement a search similar to what is described in this thread for the 1.0 api: http://drupal.org/node/408128#comment-1392556
I am trying to add a checkbox that will limit the search to a certain facet.
In trying to implement the following code I have updated the function calls:
The luceneapi_query_get call is confusing me. It seems under the 2.0 api it only has one parameter, the node type.
Following the comment posted above I have also considered going the other route, implementing hook_luceneapi_query_alter(), but again I get stuck at the luceneapi_query_get() call.
From what I can tell, a new function called luceneapi_query_parse() seems to take over where the old get() query left off. Am I going in the right direction here? All I'm trying to do is limit the search to the "title" field, and/or a faceted field.
Comment #13
Anonymous (not verified) commentedAt some point it would be great if luceneapi_subquery_add() was documented. I would also be interested in knowing more about how the $module variable that is used throughout the api.
As for my project to limit the search to one field only - I really want to put it on hold until there is some documentation available... or perhaps revert back to the 1.6 branch. Sigh.
Comment #14
cpliakas commentedHi Ryan.
The 2.0 API is substantially different from the 1.0 API, and defining facets in a 1.0 manner will not work. $module is the module executing the search, which will be 'luceneapi_node' for Search Lucene Content. $type is the type of content that is being indexed. Search Lucene Content index nodes, so $type will be 'node' in most cases.
In terms of limiting the search to one field, you can do this via the "Content bias" tab. Just change all of the fields you don't want to search by default to "Don't search". If the fields you want to search is not exposed as a bias field already, simply add one via hook_luceneapi_node_bias_fields() similar to the following:
Again, the 1.0 API posts do not apply to the 2.0 API. The change from 2.0 to 3.0 is expected to be far less drastic, and hopefully the API will more or less be tweaked.
Hope this helps,
Chris
Comment #15
cpliakas commented