lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From KV Medmeme <kv.medm...@gmail.com>
Subject (Newbie Help!) Seeking guidance in regards to Solr's suggestor and others
Date Tue, 13 Dec 2016 01:23:43 GMT
Hi Friends,

I'm new to solr, been working on it for the past 2-3 months trying to
really get my feet wet with it so that I can transition the current search
engine at my current job to solr. (Eww sphinx  haha) anyway I need some
help. I was running around the net getting my suggester working and im
stuck and I need some help. This is what I have so far. (I will explain
after I posted links to the config files)

here is a link to my managed-schema.xml
http://pastebin.com/MiEWwESP

solr config.xml
http://pastebin.com/fq2yxbvp

I am currently using Solr 6.2.1, my issue is..

I am trying to build a suggester that builds search terms or phrases based
off of the index that is in memory. I was playing around with the analyzers
and the tokenizers as well as reading some very old books that touch base
on solr 4. And I came up with this set of tokenizers and analyzer chain.
Please correct it if its wrong. But my index contains Medical Abstracts
published by Doctors and terms that I would really need to search for are
"brain cancer" , "anti-inflammatory" , "hiv-1" kinda see where im going
with? So i need to sorta preserve the white space and some sort of hyphen
delimiter. After I discovered that, (now here comes the fun part)

I type in the url:

http://localhost:8983/solr/AbstractSuggest/suggest/?spellcheck.build=true

then after when its built I query,

http://localhost:8983/solr/AbstractSuggest/suggest/?spellcheck.q=suggest_field:%22anti-infl%22

Which is perfectly fine It works great. I can see the collations so that In
my dropdown search bar for when clients search these medical articles they
can see these terms. Now In regards to PHP (solarium api to talk to solr)
now. Since this is a website and I intend on making an AJAX call to php  I
cannot see the collation list. Solarium fails on hyphenated terms as well
as fails on building the collations list. For example if I would type in

"brain canc" ( i want to search brain cancer)

It auto suggests brain , then cancer but in collations nothing is shown. If
I would to send this to the URL (localhost url, which will soon change when
moved to prod enviornment) i can see the collations. A screenshot is here..

brain can (url) -> https://gyazo.com/30a9d11e4b9b73b0768a12d342223dc3

bran canc(solarium) -> https://gyazo.com/507b02e50d0e39d7daa96655dff83c76
php code ->https://gyazo.com/1d2b8c90013784d7cde5301769cd230c

So here is where I am. The ideal goal is to have the PHP api produce the
same results just like the URL so when users type into a search bar they
can see the collations.

 Can someone please help? Im looking towards the community as the savior to
all my problems. I want to learn about solr at the same time so if future
problems popup I can solve them accordingly.

Thanks!
Happy Holidays
Kevin.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message