|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
FW: [HippoRepos-dev] multiple dasl search results onthesamerepository entryHello Willem,
I did not yet look at the code, but I should be able to sort it out relatively easy. The harder part is when you need it, because we might have to do a new repository release for it, or you would agree working with a temporary development version of one jar. What do you prefer? Ard > > Ard, > It seems your suspicion is right; we put a > Thread.sleep(10000) for 10 seconds inbetween the delete and > the put and the DASL returns unique results only. > Please let me know if you find anything. > Thanks, > Willem > Citeren Ard Schrijvers <a.schrijvers@...>: > > > Hello Willem, > > > > Can you pls use the hippocms-dev@... list to > reply to. > > > > Furthermore, can you pls test my suggestion to add a > thread.sleep of 5 > > seconds below the delete. Really easy, and would help me > pinpoint the > > issue. > > > > Thx, and pls respond to hippocms-dev@.... > > > > Regards Ard > > > > > > > > Ard, > > > Thanks for replying. Some more info: > > > the cron configuration is 0/3 * * * * ?, I didn't try changing it > > > like you suggested. > > > We restarted the repository, no change. > > > Next we threw away the repository slide_index, restarted > and then it > > > worked OK, all searches returned only distinct results. > > > > > > Below the code we use to delete and put the file. > > > > > > DocumentPath docPath = > > > webdavService.getBasePath().createRelativePath(categoryPath); > > > DocumentPath fullPath = docPath.createRelativePath(categoryPath); > > > try { > > > int exists = 0; > > > try { > > > exists = webdavService.executeHead(fullPath); > > > if (exists != HTTP_OK) { > > > webdavService.executeDelete(fullPath); > > > } > > > } catch (ClientException ce) { > > > log.debug(ce.getMessage(), ce); > > > } > > > int mkcolResult = webdavService.executeMkCols(fullPath); > > > if (mkcolResult != HTTP_CREATED && mkcolResult != > HTTP_BAD_METHOD) { > > > throw new > > > RepositoryException(Errorcode.COULD_NOT_CREATE_COLLECTION, > > > "Error with mkcol: Could not > create Webdav > > > Collection" + docPath); > > > } > > > Property[] props = new Property[propsToSet.size()]; > > > int count = 0; > > > for (Map.Entry<String, String> mapentry : > propsToSet.entrySet()) { > > > props[count++] = new Property(HIPPO_NAMESPACE_PREFIX, > > > HIPPO_NAMESPACE_URI, mapentry.getKey(), mapentry.getValue()); > > > } > > > props[count++]= new Property(HIPPO_NAMESPACE_PREFIX, > > > HIPPO_NAMESPACE_URI, "type", categorie); > > > int proppatchResult = > > > webdavService.executePropPatch(fullPath, null, props); > > > fullPath = docPath.createRelativePath(categoryPath + ".xml"); > > > int saveResult; > > > try { > > > saveResult = webdavService.executeDelete(fullPath); > > > } catch (ClientException ce) { > > > log.debug("swallowed error by purpose delete of non existing > > > doc"); > > > } > > > saveResult = webdavService.executePut(fullPath, contentStream); > > > if (saveResult != HTTP_CREATED && saveResult != > HTTP_NO_CONTENT) { > > > throw new > > > RepositoryException(Errorcode.COULD_NOT_STORE_DOCUMENT, > > > "Could not store document"); > > > } > > > Property[] p = new Property[2]; > > > p[0] = new Property(HIPPO_NAMESPACE_PREFIX, > HIPPO_NAMESPACE_URI, > > > "type", categorie); > > > p[1] = new Property(HIPPO_NAMESPACE_PREFIX, > HIPPO_NAMESPACE_URI, > > > "caption", categoryName); > > > > > > proppatchResult = > > > webdavService.executePropPatch(fullPath, null, p); } catch > > > (ClientException ce) { > > > throw new RepositoryException(Errorcode.HIPPO_REPOSITORY_DOWN, > > > "Error: something went wrong when connecting to the > > > Repository", ce); } > > > > > > > > > _______________________________________________ > > > HippoRepos-dev mailing list > > > HippoRepos-dev@... > > > http://lists.hippo.nl/mailman/listinfo/hipporepos-dev > > > > > _______________________________________________ > > HippoRepos-dev mailing list > > HippoRepos-dev@... > > http://lists.hippo.nl/mailman/listinfo/hipporepos-dev > > > > > > _______________________________________________ > HippoRepos-dev mailing list > HippoRepos-dev@... > http://lists.hippo.nl/mailman/listinfo/hipporepos-dev > Hippocms-dev: Hippo CMS development public mailinglist Searchable archives can be found at: MarkMail: http://hippocms-dev.markmail.org Nabble: http://www.nabble.com/Hippo-CMS-f26633.html |
|
|
Re: FW: [HippoRepos-dev] multiple dasl search results onthesamerepository entryArd,
We did another test by removing the DELETE altogether, which worked fine. So if we PUT the new file directly we don't have any problem on the repository side. Thanks for helping out. Willem |
|
|
RE: FW: [HippoRepos-dev] multiple dasl searchresults onthesamerepository entryHello Willem,
Well, it keeps being a 'bug' obviously, but as a work around this is a perfect solution (and I think how everybody uses the repository, for example our cms). So, if you agree working like this with it, it might be fixed in the future. It obviously has to do with the queueing of the indexing for the deletions and the puts, but is also might be a little tricky to fix (think now the 'new' queue is a separate one from the 'remove' queue, and then I have to know whether first a remove was and then a put for one document, or first a put and then a remove, obviously, quite a big difference) Anyway, since most people just use a put, we never found this issue. Great you can work with it by deleting the delete :-) Regards Ard > > > Ard, > We did another test by removing the DELETE altogether, which > worked fine. So if we PUT the new file directly we don't have > any problem on the repository side. > Thanks for helping out. > Willem > > -- > View this message in context: > http://www.nabble.com/FW%3A--HippoRepos-dev--multiple-dasl-sea > rch-results-onthesamerepository-entry-tp19608500p19608981.html > Sent from the Hippo CMS development public mailinglist > mailing list archive at Nabble.com. > > ******************************************** > Hippocms-dev: Hippo CMS development public mailinglist > > Searchable archives can be found at: > MarkMail: http://hippocms-dev.markmail.org > Nabble: http://www.nabble.com/Hippo-CMS-f26633.html > > Hippocms-dev: Hippo CMS development public mailinglist Searchable archives can be found at: MarkMail: http://hippocms-dev.markmail.org Nabble: http://www.nabble.com/Hippo-CMS-f26633.html |
| Free Forum Powered by Nabble | Forum Help |