[Nepomuk] Re: Fulltext search in nepomuk

Sebastian Trüg trueg at kde.org
Thu May 5 19:46:37 CEST 2011


Update:
Let's discuss tomorrow on how to use the DMS. If you want you can drop
by #nepomuk-kde on IRC.

On 05/05/2011 05:23 PM, Christian Mollekopf wrote:
> On Thu, 05 May 2011 16:17:56 +0200, Sebastian Trüg <trueg at kde.org> wrote:
> 
>> On 05/05/2011 11:26 AM, Christian Mollekopf wrote:
>>> On Thu, 05 May 2011 11:15:11 +0200, Sebastian Trüg <trueg at kde.org>  
>>> wrote:
>>>
>>>> On 05/05/2011 11:10 AM, Christian Mollekopf wrote:
>>>>> On Thu, 05 May 2011 11:05:50 +0200, Sebastian Trüg <trueg at kde.org>
>>>>> wrote:
>>>>>
>>>>>> If you get duplicate results it may be that nie:description is  
>>>>>> defined
>>>>>> more than once. Replace "select ?r" with "select *" in the query to
>>>>>> verify.
>>>>>
>>>>> Ok, I think thats it. I get all the different versions of the text.
>>>>> Currently I'm using:
>>>>> res.addProperty( Vocabulary::NIE::description(),  
>>>>> Soprano::LiteralValue(
>>>>> note.text() ) );
>>>>>
>>>>> I should probably use setProperty for nie:title and nie:description?
>>>>
>>>> exactly. :)
>>>
>>> I'm using the NepomukFast generated classes, because that's what the  
>>> other
>>> akonadi feeder agents do, but in NepomukFast::Resource setProperty is  
>>> not
>>> declared.
>>> Any ideas why and what to do?
>>>
>>> If possible it would be probably good to use the NepomukFast classes for
>>> feeders,
>>> as they might have to update a lot of data.
>>>
>>> Also where exactly should I use addProperty and where setProperty?
>>> In most cases, such as:
>>> res.addProperty( Soprano::Vocabulary::NAO::hasSymbol(),
>>> Soprano::LiteralValue( Note::iconName() ) );
>>>
>>> which I do on every update of a note,
>>> using addProperty would end up in setting the same information over and
>>> over again, no?
>>
>> Actually with the DMS I mentioned before the situation changes again as
>> it enforces cardinalities, ie. an addProperty would fail if the property
>> can only have one value and one already exists.
>>
>> Also you might want to try our new storeResources API. The nice thing
>> about it is that trivial instances like contacts and so on are
>> automatically merged.
>> For example the email feeder would not have to check itself it a contact
>> already existed. The DMS does that.
>>
>> If you are up to testing 95% finished API with us and give us feedback
>> that would be great.
> 
> Yes, sounds great. I guess code using that API would have to wait for 4.8?
> Where can I find the code exactly (it doesn't seem to be in kdelibs)?
> 
> In the meantime, is it possible to somehow add the setProperty call to the  
> NepomukFast classes?
> (As only addProperty is available atm.)
> 
> Cheers,
> 
> Chris
> 
>>
>> Cheers,
>> Sebastian
>>
>>>>
>>>>>>
>>>>>> On 05/05/2011 10:00 AM, Christian Mollekopf wrote:
>>>>>>> I forgot to mention:
>>>>>>>
>>>>>>> Often I get the same resource as result of such a query multiple  
>>>>>>> times
>>>>>>> (i.e. 6 times).
>>>>>>> The number of results varies for different search strings, but it
>>>>>>> seems
>>>>>>> to
>>>>>>> remain stable for multiple searches for the same string.
>>>>>>> I'm sure that the searched strings are unique within the note, as  
>>>>>>> they
>>>>>>> are
>>>>>>> some random strings.
>>>>>>>
>>>>>>> Is there a reason for this, or is it a bug?
>>>>>>>
>>>>>>> Cheers
>>>>>>>
>>>>>>>
>>>>>>> On Thu, 05 May 2011 09:51:26 +0200, Christian Mollekopf
>>>>>>> <chrigi_1 at fastmail.fm> wrote:
>>>>>>>
>>>>>>>> In the akonadi-nepomuk-note feeder, I'm using nie:description to  
>>>>>>>> set
>>>>>>>> the
>>>>>>>> text
>>>>>>>> of the note, wo It can be found via fulltext search.
>>>>>>>>
>>>>>>>> This basically works fine, meaning I'm able to find the resource
>>>>>>>> with:
>>>>>>>>
>>>>>>>> select ?r where { ?r nie:description ?label .
>>>>>>>>                   ?label bif:contains 'sometext' . }
>>>>>>>>
>>>>>>>> What I find confusing is, that not all, but most resources which I
>>>>>>>> browsed
>>>>>>>> afterwards did not have the nie:description property set (I checked
>>>>>>>> both,
>>>>>>>> resource and thing).
>>>>>>>> Not in the "browse resource view" and also not in the "show
>>>>>>>> serialized
>>>>>>>> resource" view.
>>>>>>>>
>>>>>>>> Is this just a bug in nepomukshell? And is there maybe another tool
>>>>>>>> for
>>>>>>>> me to
>>>>>>>> check the created resources?
>>>>>>>>
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>>
>>>>>>>> Chris
>>>>>>>> _______________________________________________
>>>>>>>> Nepomuk mailing list
>>>>>>>> Nepomuk at kde.org
>>>>>>>> https://mail.kde.org/mailman/listinfo/nepomuk
>>>>>>> _______________________________________________
>>>>>>> Nepomuk mailing list
>>>>>>> Nepomuk at kde.org
>>>>>>> https://mail.kde.org/mailman/listinfo/nepomuk
>>>>>>>
>>>>>> _______________________________________________
>>>>>> Nepomuk mailing list
>>>>>> Nepomuk at kde.org
>>>>>> https://mail.kde.org/mailman/listinfo/nepomuk
>>>>>
>>>>>
>>>> _______________________________________________
>>>> Nepomuk mailing list
>>>> Nepomuk at kde.org
>>>> https://mail.kde.org/mailman/listinfo/nepomuk
>>>
>>>
>> _______________________________________________
>> Nepomuk mailing list
>> Nepomuk at kde.org
>> https://mail.kde.org/mailman/listinfo/nepomuk
> 
> 


More information about the Nepomuk mailing list