This issue is on solarium-client php code, which is likely not traversing
further to pick results from collation tag of solr response.
at line 190
https://github.com/solariumphp/solarium/blob/master/library/Solarium/QueryType/Suggester/Result/Result.php#L190
verify if this is issue and do pull request, solarium contributors might
fix it.





On Mon, Dec 12, 2016 at 5:23 PM, KV Medmeme <kv.medm...@gmail.com> wrote:

> 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.
>

Reply via email to