[ckan-dev] Dataset Search

Mike Sinclair mm.sinclair08 at gmail.com
Mon May 30 12:24:17 UTC 2016


I looked into solr and found a way to match partial strings without
breaking anything. You just need to add:

    <fieldType name="text" class="solr.TextField"
positionIncrementGap="100">
        <analyzer type="index">
            <tokenizer class="solr.WhitespaceTokenizerFactory"/>
            <filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1" catenateWords="1"
catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
            <filter class="solr.LowerCaseFilterFactory"/>
            <filter class="solr.SnowballPorterFilterFactory"
language="English" protected="protwords.txt"/>
            <filter class="solr.ASCIIFoldingFilterFactory"/>
            *<filter class="solr.EdgeNGramFilterFactory" minGramSize="3"
maxGramSize="15"/>*
        </analyzer>

Storing groups and orgs in solr makes sense to me. Right now it seems sort
of disjointed.


ᐧ

On Mon, May 16, 2016 at 5:19 AM, Ian Ward <ian at excess.org> wrote:

> This is probably because we're using solr with english stemming rules for
> dataset searches, but a postgres LIKE query for group/org searches. We can
> make them more similar by replacing the LIKE query with a search on a text
> index. Even better would be storing the group and org details in solr too,
> so we could add facets and other search features that we only have on the
> dataset page.
>
> On Mon, May 16, 2016 at 3:12 AM, Mike Sinclair <mm.sinclair08 at gmail.com>
> wrote:
>
>> Hi guys,
>>
>> Is there a reason that the group and org searches will do partial string
>> matches?
>>
>> ie. "ci" will return "city" as a result.
>>
>> However for dataset search, this is not the case? It must be the complete
>> word.
>>
>> Mike
>>>>
>> _______________________________________________
>> ckan-dev mailing list
>> ckan-dev at lists.okfn.org
>> https://lists.okfn.org/mailman/listinfo/ckan-dev
>> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>>
>>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20160530/d63e6657/attachment-0003.html>


More information about the ckan-dev mailing list