Hi devs,
Is there a better way with solr query to fast get all the users (last
modified after the date "2016-01-14T15:44:02Z") of the group XWikiAdminGroup
?
For this group,
http://www.xwiki.org/xwiki/rest/wikis/xwiki/spaces/XWiki/pages/XWikiAdminGr…
now I just query with the following method, it's too slow.
1. get all user ids from the group
http://www.xwiki.org/xwiki/rest/wikis/xwiki/spaces/XWiki/pages/XWikiAdminGr…
<objects>
<objectSummary>
<headline>XWiki.LudovicDubost</headline> -> (id = XWiki.LudovicDubost)
</objectSummary>
...
...
</objects>
2. one by one check the user's modified time, if after the date, then add
the id "XWiki.LudovicDubost" to the array list.
For example:
http://www.xwiki.org/xwiki/rest/wikis/xwiki/spaces/XWiki/pages/LudovicDubost
<modified>2014-07-28T03:04:44+02:00</modified>
but it takes up lots of time for checking the modified date one by one.
3. from the list above getting from the step2, we just get all the ids, but
no detail information, we also should request server again to get the user's
detail properties one by one! it also costs much time.
If the group has 1000 users, step1 needs 1 times http request, step3 needs
1000 times http requests, step3 needs <=1000 times, all steps need 1001-2001
times requests and xml parse. Maybe the step2 is not necessary so that we
can reduce half of the time.
Therefore, is there a better way to query the last modified users?
By the way, now I query all the users modified after the date
"2016-01-14T15:44:02Z" in the wikis/xwiki. like this:
wiki:xwiki and object:XWiki.XWikiUsers and date:[2016-01-14T15:44:02Z TO *]
& number=10000
Query Example:
http://www.xwiki.org/xwiki/rest/wikis/query?q=wiki:xwiki%20and%20object:XWi…
<http://www.xwiki.org/xwiki/rest/wikis/query?q=wiki:xwiki%20and%20object:XWiki.XWikiUsers%20and%20date:[2016-02-02T15:44:02Z%20%20TO%20*]&number=10000>
But I don't know how to query fast the group's users(last modified after the
date). Could some one help me?
Thanks,
Fitz
--
View this message in context:
http://xwiki.475771.n2.nabble.com/Question-about-User-Query-with-Solr-tp759…
Sent from the XWiki- Dev mailing list archive at
Nabble.com.