Jonathan,

I had similar problem. Query:

select $identifier $title
from <#ri>
where
$obj <dc:identifier> $identifier and
$obj <dc:title> $title

returned various results depending of the number of object audits:
1) If an object has one audit record (only ingest happened) that
original metadata version 1 is retrieved.
2) If an object has second audit (like title correction) that
corrected metadata version 2 is retrieved.
3) If an object has third audit (like title correction again) metadata
version 2 and 3 is retrieved – object is shown twice in iTQL results.
4) If an object has forth audit (like title correction again) metadata
version 2 and 4 is retrieved – object is shown twice in iTQL results.

I rebuilt the index to fix this.

Serhiy Polyakov
University of North Texas



On Tue, Jan 31, 2012 at 7:44 AM, Jonathan Green
<jonat...@discoverygarden.ca> wrote:
> Thanks for creating the JIRA issue Steve!
>
> On Tue, Jan 31, 2012 at 5:00 AM, Stephen Bayliss
> <stephen.bayl...@acuityunlimited.net> wrote:
>>
>> Hi Jonathan
>>
>> It does look like there is an issue here, it looks like a character
>> encoding/translation issue.
>>
>> I notice in your XML, for the newline this is encoded:
>>
>> test with a&#13;&#10;newline
>>
>> I  tried also just using the unix-style newline - &#10; and was able to
>> replicate the problem in both cases.
>>
>> So it looks like the newline character sequence is somehow getting
>> mangled, so when it attempts to remove the old triple from the resource
>> index it's failing to match as the string literal in the resource index
>> isn't matching the value in the object to be deleted.
>>
>> I've raised a JIRA issue for this:
>> https://jira.duraspace.org/browse/FCREPO-1059
>>
>> Prior to this being fixed I'd recommend you strip any newline characters
>> from object labels.
>>
>> Regards
>> Steve
>>
>>  -----Original Message-----
>> From: Jonathan Green [mailto:jonat...@discoverygarden.ca]
>> Sent: 30 January 2012 22:15
>> To: Support and info exchange list for Fedora users.
>> Subject: Re: [fcrepo-user] Multiple Labels in Resource Index
>>
>> Hi Steve.
>>
>> I did a little more testing. If the object is purged, the current label is
>> purged, however it appears that "the bad" triples persist. Nothing of
>> interest appears in the logs, although I didn't have the logs in debug mode.
>> It appears to occur when using new lines in the label (and perhaps other
>> special characters, but specifically new lines in my case).
>>
>> The repository I am working with happens to be 3.4.2, and I haven't tested
>> this in 3.5 yet.
>>
>> Steps:
>>
>> Ingest the foxml file attached to this message, it is fairly simple except
>> for a newline in the label
>> Run ITQL query:
>> select $title from <#ri> where <info:fedora/test:object1>
>> <fedora-model:label> $title
>> Results:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <sparql xmlns="http://www.w3.org/2001/sw/DataAccess/rf1/result";>
>>   <head>
>>     <variable name="title"/>
>>   </head>
>>   <results>
>>     <result>
>>       <title>test with a
>> newline</title>
>>     </result>
>>
>>   </results>
>> </sparql>
>>
>> Change the label using the fedora flash admin client
>> Run same query
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <sparql xmlns="http://www.w3.org/2001/sw/DataAccess/rf1/result";>
>>   <head>
>>     <variable name="title"/>
>>   </head>
>>   <results>
>>     <result>
>>       <title>test with a
>> newline</title>
>>     </result>
>>
>>     <result>
>>       <title>test without newline</title>
>>     </result>
>>   </results>
>> </sparql>
>>
>> Purge Object
>> Run same query:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <sparql xmlns="http://www.w3.org/2001/sw/DataAccess/rf1/result";>
>>   <head>
>>     <variable name="title"/>
>>   </head>
>>   <results>
>>     <result>
>>       <title>test with a
>> newline</title>
>>     </result>
>>
>>   </results>
>> </sparql>
>>
>>
>> Cheers,
>> Jonathan
>>
>>
>> On Mon, Jan 30, 2012 at 12:47 PM, Stephen Bayliss
>> <stephen.bayl...@acuityunlimited.net> wrote:
>>>
>>> Hi Jonathan
>>>
>>> It would be interesting to see what happens if the object is purged - do
>>> all (both) of the label triples disappear?  And if you then re-ingest it, do
>>> you then have the correct number of labels?
>>>
>>> It does look like there may have been a failure to remove an old version.
>>>
>>> Which version of the label was the first one?  Maybe you could do a test
>>> first adding the old version and then the new one to see if there are any
>>> errors reported (I'd doubt there was an issue with these two values but it
>>> would be good to check just in case).
>>>
>>> Regards
>>> Steve
>>>
>>> -----Original Message-----
>>> From: Jonathan Green [mailto:jonat...@discoverygarden.ca]
>>> Sent: 30 January 2012 15:03
>>> To: Support and info exchange list for Fedora users.
>>> Subject: [fcrepo-user] Multiple Labels in Resource Index
>>>
>>> Hello.
>>>
>>> I was wondering if anyone has seen this before. I am having trouble where
>>> a query for fedora label is returning multiple different labels.
>>>
>>> Query:
>>> select $title from <#ri> where <info:fedora/test:object>
>>> <fedora-model:label> $title
>>>
>>> Results:
>>> <sparql xmlns="http://www.w3.org/2001/sw/DataAccess/rf1/result";>
>>> <head>
>>> <variable name="object"/>
>>> <variable name="title"/>
>>> </head>
>>> <results>
>>> <result>
>>> <object uri="info:fedora/test:object"/>
>>> <title>
>>> -test
>>> </title>
>>> </result>
>>> <result>
>>> <object uri="info:fedora/test:object"/>
>>> <title>test:object</title>
>>> </result>
>>> <result>
>>> <object uri="info:fedora/test:object"/>
>>> <title>
>>> test
>>> </title>
>>> </result>
>>> </results>
>>> </sparql>
>>>
>>> It only seems to happen sporadically its like the other labels aren't
>>> getting deleted when a new label is created, but it is happening often
>>> enough that it is causing some problems.
>>>
>>> As a short term solution: Is there a way to reindex specific pids into
>>> the resource index?
>>>
>>> Thanks.
>>>
>>> --
>>> Jonathan Green
>>> DiscoveryGarden Inc.
>>> Sims Office Suites Building, 3rd Floor, 118 Sydney Street
>>> Charlottetown, PE C1A 1G4
>>> 902.367.3851 discoverygarden.ca
>>> jonat...@discoverygarden.ca
>>> skype: jonathan.edwards.green
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Try before you buy = See our experts in action!
>>> The most comprehensive online learning library for Microsoft developers
>>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
>>> Metro Style Apps, more. Free future releases when you subscribe now!
>>> http://p.sf.net/sfu/learndevnow-dev2
>>> _______________________________________________
>>> Fedora-commons-users mailing list
>>> Fedora-commons-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
>>>
>>
>>
>>
>> --
>> Jonathan Green
>> DiscoveryGarden Inc.
>> Sims Office Suites Building, 3rd Floor, 118 Sydney Street
>> Charlottetown, PE C1A 1G4
>> 902.367.3851 discoverygarden.ca
>> jonat...@discoverygarden.ca
>> skype: jonathan.edwards.green
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Keep Your Developer Skills Current with LearnDevNow!
>>
>> The most comprehensive online learning library for Microsoft developers
>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
>> Metro Style Apps, more. Free future releases when you subscribe now!
>> http://p.sf.net/sfu/learndevnow-d2d
>>
>> _______________________________________________
>> Fedora-commons-users mailing list
>> Fedora-commons-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
>>
>
>
>
> --
> Jonathan Green
> DiscoveryGarden Inc.
> Sims Office Suites Building, 3rd Floor, 118 Sydney Street
> Charlottetown, PE C1A 1G4
> 902.367.3851 discoverygarden.ca
> jonat...@discoverygarden.ca
> skype: jonathan.edwards.green
>
>
> ------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
> _______________________________________________
> Fedora-commons-users mailing list
> Fedora-commons-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
>

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Fedora-commons-users mailing list
Fedora-commons-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users

Reply via email to