Re: php-gtk2-doc search
| From: | Christian Weiske | Date: | Fri, 24 Feb 2006 10:29:23 +0000 |
| Subject: | Re: php-gtk2-doc search | ||
| References: | 1 2 | Groups: | php.gtk.doc |
| Request: | Send a blank email to php-gtk-doc+get-1862@lists.php.net to get a copy of this message | ||
Scott,
> GtkScrolledWindow and GtkWindowGroup are both missing.
That's due to the nature of the search index. To speed up searching, the
script doesn't search all the file names with strpos, but uses an index
instead. Using that also allows prioritizing.
The index itself contains words with an array of matching file names it
appears in. The words are calculated with the following algorithm:
- remove "gtk/gdk/atk/pango" from classname and use stripped classname
and normal classname as word
- methods/properties/all other: split the name by "_" and use that as
words. Further, combine adjacent split words to a new word.
When searching, I only have to look for the words as keys in the array,
and intersect the result arrays of the different words.
So when searching for "window", "gtkscrolledwindow" will not appear,
because only "gtkscrolledwindow" and "scrolledwindow" are as words for
it in the index. Since there is no underscore between scrolled and
window, it can't be indexed. And because I use file names as index base,
I can't split the class names by camelCase (filenames are lowercase only).
Yes, I could use strpos on all file names. That would give more results
perhaps, but it doesn't allow priorities and is slower IMO.
> Also, the search seems to strip out '_'.
Fixed.
> window") I only get one result and it is level three. I would think that
> being the only match it would have jumped up to level one.
The level3 method thing is fixed.
--
Regards/MfG,
Christian Weiske