[vote] Missing searchDocumentsNames functionality

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[vote] Missing searchDocumentsNames functionality

Sergiu Dumitriu
com.xpn.xwiki.store.XWikiHibernateStore.searchDocumentsNames supports a selectColumns parameter which is supposed to specify which columns should be selected.

This parameter is used when building the select string, but the columns are not included in the returned list, so this parameter just makes a bigger select string and increases the execution time.

In order to include the specified columns in the result, I propose this:
- if selectedColumns is the empty string, keep the previous behavior (return a list of document names)
- if selectedColumns is not empty, then return a list of hashmaps, with the column name as the key, with a special name for the document name (for example docname)




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: [vote] Missing searchDocumentsNames functionality

Ludovic Dubost

0

I think we need to make a more complete review of the current search APIs.

There are some security issues with sending column data in the search
results.
searchDocumentNames is an API sending back non sensitive data (only the
document names).
I believe it should be a different API sending more complex results.

I think also which should add a parameter to filter search results
according to viewer rights.

Also the HQL search API should start to be depreciated since we now have
the QueryPlugin API based on XQuery. However I've seen that the XQuery
api does not have the full capabilities of the HQL API so our API will
need to have a way to call the storage specific search API.

So maybe te right way to do it is to keep the current API for
compatibility and put the new APIs on the QueryPlugin and implement a
clean and nice search API in the QueryPlugin, including a storage
specific API.

Ludovic

Sergiu Dumitriu a écrit :

> com.xpn.xwiki.store.XWikiHibernateStore.searchDocumentsNames supports
> a selectColumns parameter which is supposed to specify which columns
> should be selected.
>
> This parameter is used when building the select string, but the
> columns are not included in the returned list, so this parameter just
> makes a bigger select string and increases the execution time.
>
> In order to include the specified columns in the result, I propose this:
> - if selectedColumns is the empty string, keep the previous behavior
> (return a list of document names)
> - if selectedColumns is not empty, then return a list of hashmaps,
> with the column name as the key, with a special name for the document
> name (for example docname)
>
>
> ------------------------------------------------------------------------
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>  

--
Ludovic Dubost
Blog: http://www.ludovic.org/blog/
XWiki: http://www.xwiki.com
Skype: ldubost GTalk: ldubost
AIM: nvludo Yahoo: ludovic




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: [vote] Missing searchDocumentsNames functionality

vmassol
Administrator
In reply to this post by Sergiu Dumitriu

I don’t have an opinion on this yet. I’ll follow what you guys says is best.

 

-Vincent

 

From: Sergiu Dumitriu [mailto:[hidden email]]
Sent: dimanche 31 décembre 2006 02:35
To: [hidden email]
Subject: [xwiki-dev] [vote] Missing searchDocumentsNames functionality

 

com.xpn.xwiki.store.XWikiHibernateStore.searchDocumentsNames supports a selectColumns parameter which is supposed to specify which columns should be selected.

This parameter is used when building the select string, but the columns are not included in the returned list, so this parameter just makes a bigger select string and increases the execution time.

In order to include the specified columns in the result, I propose this:
- if selectedColumns is the empty string, keep the previous behavior (return a list of document names)
- if selectedColumns is not empty, then return a list of hashmaps, with the column name as the key, with a special name for the document name (for example docname)



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: [vote] Missing searchDocumentsNames functionality

Sergiu Dumitriu
Ludovic, you are right. searchDocumentNames should not return anything else than document names. Then we could completely ignore the selectColumns parameter in this function, since it is not used. This will have no impact on the code.

I'll write a private function that treats the selectColumns parameter as specified, and if we will ever find it useful, we can make it public and link it to an API.


On 1/2/07, Vincent Massol <[hidden email]> wrote:

I don't have an opinion on this yet. I'll follow what you guys says is best.

 

-Vincent

 

From: Sergiu Dumitriu [mailto:[hidden email]]
Sent: dimanche 31 décembre 2006 02:35
To: [hidden email]
Subject: [xwiki-dev] [vote] Missing searchDocumentsNames functionality

 

com.xpn.xwiki.store.XWikiHibernateStore.searchDocumentsNames supports a selectColumns parameter which is supposed to specify which columns should be selected.

This parameter is used when building the select string, but the columns are not included in the returned list, so this parameter just makes a bigger select string and increases the execution time.

In order to include the specified columns in the result, I propose this:
- if selectedColumns is the empty string, keep the previous behavior (return a list of document names)
- if selectedColumns is not empty, then return a list of hashmaps, with the column name as the key, with a special name for the document name (for example docname)



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto: [hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.objectweb.org/wws" target="_blank">http://www.objectweb.org/wws





--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: [vote] Missing searchDocumentsNames functionality

Jean-Vincent Drean
In reply to this post by vmassol
2007/1/2, Vincent Massol <[hidden email]>:
>
> I don't have an opinion on this yet. I'll follow what you guys says is best.
>

ibid so, 0.

JV.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: [vote] Missing searchDocumentsNames functionality

Sergiu Dumitriu
This was committed already like this:

- the searchDocumentsNames function completely ignores the selectColumns parameter
- a protected function called searchDocumentsNamesAdvanced works as I described (the code was already written, so I should have put it somewhere). Being a protected method, means that it won't be accessible from outside the class.

On 1/4/07, Jean-Vincent Drean <[hidden email]> wrote:
2007/1/2, Vincent Massol <[hidden email]>:
>
> I don't have an opinion on this yet. I'll follow what you guys says is best.
>

ibid so, 0.

JV.




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws





--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws