Using "local" search

User avatar
moredruid
Expert
Posts: 791
Joined: Tue Jan 20, 2009 1:33 am
Location: Netherlands
Contact:

Using "local" search

Postby moredruid » Sun Feb 15, 2009 11:57 am

Hi
I'm wondering, the HDA setup pages have a search button called "HDA" and "web", but both seem to only give me niceurl results, and no real hits.

I expected this to work this way: the hda search button searches your HDA, and the web button searches the web (kind of like a google box).

am I missing a package that I should have had installed?
I'd gladly install Lucene if necessary for the local search.
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D2173656C7572206968616D41snlbxq' | dc
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: Using "local" search

Postby cpg » Sun Feb 15, 2009 1:48 pm

do you know lucene?

this was hooked to locate and lucene was attempted, however, it broke when we upgraded to a new version of rails and we put some "rigged" hits to not show a broken page, but we never got around to fix it :(

if you are interested in helping, that would be a very welcome contribution.
attach yourself to bug #24 and let's work on it. :)

http://bugs.amahi.org/issues/show/24

the code is in http://git.amahi.org/?p=amahi.git;a=blo ... 19;hb=HEAD

however, i am happy to help with that part if you have some experience with lucene!
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

User avatar
moredruid
Expert
Posts: 791
Joined: Tue Jan 20, 2009 1:33 am
Location: Netherlands
Contact:

Re: Using "local" search

Postby moredruid » Mon Feb 16, 2009 1:34 am

hmm not sure how to attach a comment to the git etc.

first of: I'm not a coder at all (actually I'm a sysadmin - which means I can take existing code, modify it up to a point that it's still working but nobody understands how or why it can still work :) )

I did a quick google and ferret seems to be nice (ruby lucene drop in replacement that is faster(!) than lucene).
I tried a gem install of ferret but that didn't work right, never worked with gem so I'm not sure why it failed except for this error:

Code: Select all

ERROR: Failed to build gem native extension.
aaaaanyway, I'd love to help testing and things like that but I don't think I can be of any help if you want stable code :mrgreen:
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D2173656C7572206968616D41snlbxq' | dc
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: Using "local" search

Postby cpg » Mon Feb 16, 2009 2:12 am

no worries. getting the logistics is a good portion of the work. see, i did not know about ferret. it does look interesting!

this worked for me to install ferret (gem is just like rpms, CPAN, etc.):

Code: Select all

bash$ sudo gem install --no-ri --no-rdoc ferret Building native extensions. This could take a while... Successfully installed ferret-0.11.6 1 gem installed bash$
the options are optional and are only for not installing docs, etc.

if you do know the logistics of lucene, that is worth a look!
a simple text interface is ok.
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

User avatar
moredruid
Expert
Posts: 791
Joined: Tue Jan 20, 2009 1:33 am
Location: Netherlands
Contact:

Re: Using "local" search

Postby moredruid » Mon Feb 16, 2009 8:12 am

nope, still the same error :|

Code: Select all

[root@butler ~]# gem install --no-ri --no-rdoc ferret Building native extensions. This could take a while... ERROR: Error installing ferret: ERROR: Failed to build gem native extension. /usr/bin/ruby extconf.rb install --no-ri --no-rdoc ferret creating Makefile make gcc -I. -I/usr/lib/ruby/1.8/i386-linux -I/usr/lib/ruby/1.8/i386-linux -I. -D_FILE_OFFSET_BITS=64 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -Wall -fPIC -D_FILE_OFFSET_BITS=64 -c bitvector.c make: gcc: Command not found make: *** [bitvector.o] Error 127 Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/ferret-0.11.6 for inspection. Results logged to /usr/lib/ruby/gems/1.8/gems/ferret-0.11.6/ext/gem_make.out
hmm gcc should be installed on this system (vanilla F9)... aha! gcc not installed... weird but true (is gcc not a default package?), but nothing a yum install gcc can't fix... and 2 minutes later 1gem installed :D

OK... so that's what I have now... I've never played with ruby and all that kind of stuff but I should be able to find something on the web...
If I cobble something up that works I'll take a look how to "integrate" it with the hda interface (i.e. link the .css and have it look uniform with the rest).
Most of the stuff should go into /var/hda/platform right?
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D2173656C7572206968616D41snlbxq' | dc
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD

Who is online

Users browsing this forum: No registered users and 16 guests