You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by "Rupert Westenthaler (JIRA)" <ji...@apache.org> on 2011/07/22 11:33:58 UTC

[jira] [Commented] (STANBOL-297) Add support for optional text constraints to FieldQuery

    [ https://issues.apache.org/jira/browse/STANBOL-297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13069461#comment-13069461 ] 

Rupert Westenthaler commented on STANBOL-297:
---------------------------------------------

Changes to TextConstraint Interface

* String getText() -> List<String> getTexts()
* String getText() will be deprecated and only return the first element of the list
* new Constructors that allow to parse a List<String> texts as first Argument

Changes to JSON serialization

In future both String values AND JSON lists are supported as values for the "text" key. Therefore existing Applications do not need to be adapted (if the do not plan to use this feature)

All the following three examples will be supported (however the first one would also select all Entities with Barack or Obama in its label while the other two would require both words in the label.

    "constraints": [{ 
       "type": "text", 
       "languages": ["en"], 
       "text": ["Barack","Obama"], 
       "field": "http:\/\/www.w3.org\/2000\/01\/rdf-schema#label",
    }]

    "constraints": [{ 
       "type": "text", 
       "languages": ["en"], 
       "text": "Barack Obama", 
       "field": "http:\/\/www.w3.org\/2000\/01\/rdf-schema#label",
    }]
    
    "constraints": [{ 
       "type": "text", 
       "languages": ["en"], 
       "text": ["Barack Obama"], 
       "field": "http:\/\/www.w3.org\/2000\/01\/rdf-schema#label",
    }]

The ResultList (also containing the query as executed) will also use a String as value of "text" in case a TextConstraint contains only a single text value.


> Add support for optional text constraints to FieldQuery
> -------------------------------------------------------
>
>                 Key: STANBOL-297
>                 URL: https://issues.apache.org/jira/browse/STANBOL-297
>             Project: Stanbol
>          Issue Type: New Feature
>          Components: Entity Hub
>            Reporter: Rupert Westenthaler
>            Assignee: Rupert Westenthaler
>
> Currently TextConstraint only supports a singe Text. The semantic is that returned Entities must contain the whole text. This extension will allow to explicit search for "Text1" OR "Text2".
> Implementations are encouraged to boost the Rank of Results that contain more/all of the optionally parsed texts.
> This types of queries are planed to be used by the Taxonomy Engine to search for Entities based on Chunks selected within the Text. Currently multiple queries need to be executed by first searching for the whole Chunk and if no results are found repeating the search with omitted Words.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira