[GeoNode-users] text search question

Ariel Nunez ingenieroariel at gmail.com
Thu Aug 27 05:00:51 PDT 2015


There is a filed in the resourcebase that is way better than the title for
searching, it is a full text dump of the metadata and returns better
results. We should be using that _without_ matching case instead of the
restrictive title case that we have now.

Guido, I would be happy to review a pull request to change this behaviour
by default in GeoNode.

-a

On Thu, Aug 27, 2015 at 1:13 AM, Simone Dalmasso <simone.dalmasso at gmail.com>
wrote:

> Hi, if you are referring to the thext search box on the left part of the
> search pages then you need to make sure that the api supports the filtering
> that you need, see
>  https://github.com/GeoNode/geonode/blob/master/geonode/api/resourcebase_api.py#L44
> <https://github.com/GeoNode/geonode/blob/master/geonode/api/resourcebase_api.py#L44>
> ,
>
> then add the html part, templates are here
> https://github.com/GeoNode/geonode/tree/master/geonode/templates/search,
>
> then add the logic for the search that is in this file,
> https://github.com/GeoNode/geonode/blob/master/geonode/static/geonode/js/search/search.js.
> Here, depending on the type of filter that you need, the logic may vary but
> if you want to apply a filter similar to the text one then see this part of
> the file
> https://github.com/GeoNode/geonode/blob/master/geonode/static/geonode/js/search/search.js#L369.
> Autocomplete is used for the autosuggestion when typing, the search is done
> by appending "title__contains=keyword" to the $scope.query and then trigger
> the query_api function.
>
> If you want to change the behavior of the top page search bar then is you
> have to modify the html in base.html
> https://github.com/GeoNode/geonode/blob/master/geonode/templates/base.html#L74,
> but that is a pure html form.
>
> Hope this helps
>
> 2015-08-27 7:38 GMT+02:00 Häfliger Guido <guido.haefliger at vogelwarte.ch>:
>
>> Hello
>>
>> We test geonode to manage our metadata (version 2.4b25). Is it possible
>> to extend the text search to other attribute fields? For the moment the
>> text search only use the layer name. If it is possible, where can I
>> configure it?
>>
>> Regards
>> Guido
>>
>> ____________________________________________________
>>
>> Dipl. Ing. ETH Guido Häfliger
>> EDV/GIS-Spezialist
>> Tel. ++41 41 462 97 60
>>
>> *guido.haefliger at vogelwarte.ch <guido.haefliger at vogelwarte.ch> *
>>
>> *www.vogelwarte.ch <http://www.vogelwarte.ch> *Schweizerische Vogelwarte
>> | Seerose 1 | CH-6204 Sempach | Schweiz
>>
>>
>>
>>
>> _______________________________________________
>> geonode-users mailing list
>> geonode-users at lists.osgeo.org
>> http://lists.osgeo.org/cgi-bin/mailman/listinfo/geonode-users
>>
>>
>
>
> --
> Simone
>
> _______________________________________________
> geonode-users mailing list
> geonode-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/geonode-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20150827/d3329b1b/attachment.html>


More information about the geonode-users mailing list