collective.restapi.facetedsearch


Namecollective.restapi.facetedsearch JSON
Version 1.0.2 PyPI version JSON
download
home_pagehttps://git.saw-leipzig.de/muellers/collective.restapi.facetedsearch
SummaryAn add-on for Plone and plone.restapi providing a extended search service
upload_time2023-07-17 06:59:51
maintainer
docs_urlNone
authormuellers
requires_python==2.7, >=3.6
licenseGPL version 2
keywords python plone
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. This README is meant for consumption by humans and pypi. Pypi can render rst files so please do not use Sphinx features.
   If you want to learn more about writing documentation, please check out: http://docs.plone.org/about/documentation_styleguide.html
   This text does not appear on pypi or github. It is a comment.

================================
collective.restapi.facetedsearch
================================

This addon provides Plone-REST-Api endpoints for a faceted search. The GET endpoint is highly inspired by the REST-Api search and the POST endpoint is highly inspired by the REST-Api querystringsearch. Configuration of facets must be done by overloading GroupByCriteria of collective.collectionfilter

Features
========

- GET endpoint ``@faceted-search`` can be used like the 'normal' search-endpoint of the REST-Api ``@search``, but it calculates and adds requested facets to the result set
- GET endpoint can list all available and configured facets
- POST endpoint ``@faceted-search`` can be used like the querystring search-endpoint of the REST-Api ``@querystring-search``, but it calculates and adds requested facets to the result set


Documentation
=============

GET endpoint
------------
``@faceted-search``

This endpoint accepts all parameter of the 'normal' search endpoint of the REST Api like ``b_size``, ``sort_on`` etc, and additionally three more: ``facets``, ``facets_only`` and ``possible_facets``.
To get a list of all available and configured facets add parameter ``possible_facets=1`` to the request.
Choose one or more of the available facets and add them as stringlist parameter  ``facets`` to the request. The search response json will be extended with object property "facets", and each of the facets contains a list with all item occurences of the facet in the resultset and the count how often they appear on the resultset


POST endpoint
-------------
``@faceted-search``

This endpoint accepts all parameter from the querystring-search endpoint of the REST Api, like ``query``, ``sort_on`` etc, and additionally three more: ``facets``, ``facets_only`` and ``possible_facets``. Provide the parameter in the request body as it is a post request.

Choose one or more of the available facets and add them as stringlist parameter  ``facets`` to the request.
The search response json will be extended with object property "facets", and each of the facets contains a list with all item occurences of the facet in the resultset and the count how often they appear on the resultset

Configuration of facets
-----------------------

Configuration is done by overloading collective.collectionfilter GroupByCriteria.
<https://github.com/collective/collective.collectionfilter#overloading-groupbycriteria>



Examples
========

GET Request
-----------

``http://localhost:8080/Plone/@faceted-search?b_size=24&SearchableText=Searchtext&facets=portal_type&facets=Subject``

POST Request
------------

``http://localhost:8080/Plone/@faceted-search`` with body::

  {
    "query": [

          {
            "i": "portal_type",
            "o": "plone.app.querystring.operation.selection.any",
            "v":
                ["stock", "person"]

        }
    ],
    "limit": 2000,
    "b_size": 2,
    "facets": [
        "tax_research_fields",
        "commentators",
        "location",
        "Subject"
    ]
  }


Installation
============


Install collective.restapi.facetedsearch by adding it to your buildout::

    [buildout]

    ...

    eggs =
        collective.restapi.facetedsearch


and then running ``bin/buildout``


Dependencies
------------

All dependencies are installed automatically when installing collective.restapi.facetedsearch.
Here is just a list of those for reference:

- setuptools
- plone.restapi
- collective.collectionfilter


Contribute
==========

- Issue Tracker: https://git.saw-leipzig.de/muellers/collective.restapi.facetedsearch/-/issues
- Source Code: https://git.saw-leipzig.de/muellers/collective.restapi.facetedsearch.git
- Documentation: https://docs.plone.org


License
=======

The project is licensed under the GPLv2.


Contributors
============

- muellers, muellers@saw-leipzig.de


Changelog
=========

1.0.2 (2023-07-05)
------------------

-added some project description


1.0.1 (2022-06-02)
------------------

- bugfix for empty query and empty resultset in post handler
- removing limit in post handler


1.0.0 (2022-05-09)
------------------

- Initial release.
  [muellers]
            

Raw data

            {
    "_id": null,
    "home_page": "https://git.saw-leipzig.de/muellers/collective.restapi.facetedsearch",
    "name": "collective.restapi.facetedsearch",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "==2.7, >=3.6",
    "maintainer_email": "",
    "keywords": "Python Plone",
    "author": "muellers",
    "author_email": "muellers@saw-leipzig.de",
    "download_url": "https://files.pythonhosted.org/packages/76/f1/acc407c924f76f211685bb4ba0e394c0143e0c775b437399f993387ee94a/collective.restapi.facetedsearch-1.0.2.tar.gz",
    "platform": null,
    "description": ".. This README is meant for consumption by humans and pypi. Pypi can render rst files so please do not use Sphinx features.\n   If you want to learn more about writing documentation, please check out: http://docs.plone.org/about/documentation_styleguide.html\n   This text does not appear on pypi or github. It is a comment.\n\n================================\ncollective.restapi.facetedsearch\n================================\n\nThis addon provides Plone-REST-Api endpoints for a faceted search. The GET endpoint is highly inspired by the REST-Api search and the POST endpoint is highly inspired by the REST-Api querystringsearch. Configuration of facets must be done by overloading GroupByCriteria of collective.collectionfilter\n\nFeatures\n========\n\n- GET endpoint ``@faceted-search`` can be used like the 'normal' search-endpoint of the REST-Api ``@search``, but it calculates and adds requested facets to the result set\n- GET endpoint can list all available and configured facets\n- POST endpoint ``@faceted-search`` can be used like the querystring search-endpoint of the REST-Api ``@querystring-search``, but it calculates and adds requested facets to the result set\n\n\nDocumentation\n=============\n\nGET endpoint\n------------\n``@faceted-search``\n\nThis endpoint accepts all parameter of the 'normal' search endpoint of the REST Api like ``b_size``, ``sort_on`` etc, and additionally three more: ``facets``, ``facets_only`` and ``possible_facets``.\nTo get a list of all available and configured facets add parameter ``possible_facets=1`` to the request.\nChoose one or more of the available facets and add them as stringlist parameter  ``facets`` to the request. The search response json will be extended with object property \"facets\", and each of the facets contains a list with all item occurences of the facet in the resultset and the count how often they appear on the resultset\n\n\nPOST endpoint\n-------------\n``@faceted-search``\n\nThis endpoint accepts all parameter from the querystring-search endpoint of the REST Api, like ``query``, ``sort_on`` etc, and additionally three more: ``facets``, ``facets_only`` and ``possible_facets``. Provide the parameter in the request body as it is a post request.\n\nChoose one or more of the available facets and add them as stringlist parameter  ``facets`` to the request.\nThe search response json will be extended with object property \"facets\", and each of the facets contains a list with all item occurences of the facet in the resultset and the count how often they appear on the resultset\n\nConfiguration of facets\n-----------------------\n\nConfiguration is done by overloading collective.collectionfilter GroupByCriteria.\n<https://github.com/collective/collective.collectionfilter#overloading-groupbycriteria>\n\n\n\nExamples\n========\n\nGET Request\n-----------\n\n``http://localhost:8080/Plone/@faceted-search?b_size=24&SearchableText=Searchtext&facets=portal_type&facets=Subject``\n\nPOST Request\n------------\n\n``http://localhost:8080/Plone/@faceted-search`` with body::\n\n  {\n    \"query\": [\n\n          {\n            \"i\": \"portal_type\",\n            \"o\": \"plone.app.querystring.operation.selection.any\",\n            \"v\":\n                [\"stock\", \"person\"]\n\n        }\n    ],\n    \"limit\": 2000,\n    \"b_size\": 2,\n    \"facets\": [\n        \"tax_research_fields\",\n        \"commentators\",\n        \"location\",\n        \"Subject\"\n    ]\n  }\n\n\nInstallation\n============\n\n\nInstall collective.restapi.facetedsearch by adding it to your buildout::\n\n    [buildout]\n\n    ...\n\n    eggs =\n        collective.restapi.facetedsearch\n\n\nand then running ``bin/buildout``\n\n\nDependencies\n------------\n\nAll dependencies are installed automatically when installing collective.restapi.facetedsearch.\nHere is just a list of those for reference:\n\n- setuptools\n- plone.restapi\n- collective.collectionfilter\n\n\nContribute\n==========\n\n- Issue Tracker: https://git.saw-leipzig.de/muellers/collective.restapi.facetedsearch/-/issues\n- Source Code: https://git.saw-leipzig.de/muellers/collective.restapi.facetedsearch.git\n- Documentation: https://docs.plone.org\n\n\nLicense\n=======\n\nThe project is licensed under the GPLv2.\n\n\nContributors\n============\n\n- muellers, muellers@saw-leipzig.de\n\n\nChangelog\n=========\n\n1.0.2 (2023-07-05)\n------------------\n\n-added some project description\n\n\n1.0.1 (2022-06-02)\n------------------\n\n- bugfix for empty query and empty resultset in post handler\n- removing limit in post handler\n\n\n1.0.0 (2022-05-09)\n------------------\n\n- Initial release.\n  [muellers]",
    "bugtrack_url": null,
    "license": "GPL version 2",
    "summary": "An add-on for Plone and plone.restapi providing a extended search service",
    "version": "1.0.2",
    "project_urls": {
        "Homepage": "https://git.saw-leipzig.de/muellers/collective.restapi.facetedsearch",
        "PyPI": "https://pypi.python.org/pypi/collective.restapi.facetedsearch",
        "Source": "https://git.saw-leipzig.de/muellers/collective.restapi.facetedsearch.git",
        "Tracker": "https://git.saw-leipzig.de/muellers/collective.restapi.facetedsearch/-/issues"
    },
    "split_keywords": [
        "python",
        "plone"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "76f1acc407c924f76f211685bb4ba0e394c0143e0c775b437399f993387ee94a",
                "md5": "116ae15e62e6debc127cab689b762948",
                "sha256": "a94516892edf3e3d6347ece9370aa78b405711cbeb0f6878c763c9e3ed8dff42"
            },
            "downloads": -1,
            "filename": "collective.restapi.facetedsearch-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "116ae15e62e6debc127cab689b762948",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "==2.7, >=3.6",
            "size": 18991,
            "upload_time": "2023-07-17T06:59:51",
            "upload_time_iso_8601": "2023-07-17T06:59:51.296053Z",
            "url": "https://files.pythonhosted.org/packages/76/f1/acc407c924f76f211685bb4ba0e394c0143e0c775b437399f993387ee94a/collective.restapi.facetedsearch-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-17 06:59:51",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "collective.restapi.facetedsearch"
}
        
Elapsed time: 0.13887s