[opencms-dev] retreiving content resources by property(secondtime)

Jonathan Woods jonathan.woods at scintillance.com
Thu Jan 19 15:31:11 CET 2006


Osama -

Concerning the Lucene-style implementation, Shi Yusen on this list gave me a
few pointers:

http://mail.opencms.org/pipermail/opencms-dev/2006q1/021525.html

Jon 

-----Original Message-----
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Osama Abu Elsorour
Sent: 19 January 2006 10:05
To: 'The OpenCms mailing list'
Subject: RE: [opencms-dev] retreiving content resources by
property(secondtime)

Andreas

Thank you for the clarification. That works great.

What do you think about the complex-query file collector that I have
proposed earlier?

Also, will FlexCache cache the results of readResourcesWithProperty (or the
complex-query collector, if I were to make it) in the JSP page?

The reason I am asking is that this website will have a LOT of articles.
Doing a query like "Get latest article by this author" could potentially
search into tens of thousands of articles.

Thanks again for your quick responses.

-----Original Message-----
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Andreas Zahner
Sent: Thursday, January 19, 2006 11:20 AM
To: 'The OpenCms mailing list'
Subject: RE: [opencms-dev] retreiving content resources by
property(secondtime)

Osama,

the XML content already supports the feature of mapping element values on
properties or VFS file attributes. In the annotation section of your XSD, do
the following to achieve this (the example below is taken from the
templateone modules):

<xsd:annotation>
	<xsd:appinfo>
	...
	<mappings>
		<mapping element="Title" mapto="property:Title" />
		<mapping element="Release" mapto="attribute:datereleased" />
		<mapping element="Priority"
mapto="property:collector.priority" />
		...
		<mapping element="Channel"
mapto="propertyList:collector.channel" />
	</mappings>
	...
	</xsd:appinfo>
</xsd:annotation>

A special mapping is the "propertyLis"t mapping, which maps the values of an
element with multiple occcurences to a single property as a List represented
by a String using a delimiter.

Regards,

Andreas Zahner
Alkacon Software - The OpenCms Experts
http://www.alkacon.com 


-----Original Message-----
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Osama Abu Elsorour
Sent: Thursday, January 19, 2006 10:06 AM
To: 'The OpenCms mailing list'
Subject: RE: [opencms-dev] retreiving content resources by
property(secondtime)

Thank you guys for your suggestions.

Andreas:
I have looked at your proposition and it seems feasible enough to use.
However, I would like to propose the following:
The Problems:
- This method looks on one property with a specific property with a specific
value. If I want to do a bit more complex lookups it will not help.
- Properties will have to be entered separately. Meaning that after the
editor fills his XML content form, he/she will have to edit the file
properties and add/edit the properties that will be used in the lookups.
Major inconvenience.

So I thought of doing the following (actually kinda started on it too):
- Build a custom XML type, call it XmlPropertyType for example
  - It represents a string, very similar to XmlString
  - It will also reflect any changes to it to a property with the same name
For example, if we add a form field called "Author" with type
XmlPropertyType, it will be saved normally in the XML file as a normal
string and in the same time will update a property called "Author" as well.
This way "Author" can be used in ContentShow and can be queried as property
without doing double the data entry work.
I know this might seem as an ugly redundancy in storage, but hear me out.



_______________________________________________
This mail is sent to you from the opencms-dev mailing list To change your
list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev


_______________________________________________
This mail is sent to you from the opencms-dev mailing list To change your
list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev





More information about the opencms-dev mailing list