Skip to Content
avatar image
Former Member

Query-based taxonomy - DATE property

Hi,

have anybody tried to use query based taxonomy where queries are created on DATE-type property?

For example classifying documents into months, ...

Date properties does not show when defining the query.

Is it possible at all?

Roman

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Jun 23, 2004 at 04:22 PM

    Hi,

    I guess a search for a date attribute should be started.

    Therefore you have to specify:

    <b>queryEntry.setRowType(IQueryEntry.ROW_TYPE_ATTRIBUTE)</b>

    instead of

    queryEntry.setRowType(IQueryEntry.ROW_TYPE_TERM)

    Regards, Klaus

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      It is right.

      It works fine if I use Your suggestion and a String value in the search like this:

      queryEntry.setValue("20040629");

      But doen't work if I write:

      queryEntry.setPropertyType (IQueryEntry.PROPERTY_TYPE_DATE);

      Date d1 = new Date(y,m,g);

      queryEntry.setValue(d1);

      even if the property is a Date Type.

      Thanks. It's OK for me.

      Regards, Giorgio

  • avatar image
    Former Member
    Jun 03, 2004 at 02:00 PM

    Hi ,

    We've the same problem !!

    We cannot use CM date properties in Query Builder.

    Please help us ....

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      I have the same problem!

      I wrote some code to search documents using their properties.

      This piece of code works well if the property is a String type but

      doesn't work if the type of property is Date:

      IQueryEntry queryEntry = searchIndex.getNewQueryEntry();

      queryEntry.setRowType(IQueryEntry.ROW_TYPE_TERM);

      IPropertyName dataDocPropertyName = new PropertyName

      ("http://sapportals.com/xmlns/cm", "dataDoc");

      queryEntry.setPropertyName(dataDocPropertyName);

      queryEntry.setTermAction(IQueryEntry.TERM_ACTION_EXACT);

      queryEntry.setTermWeight(1.0F);

      Date d1 = new Date(y,m,g);

      queryEntry.setValue(d1);

      queryEntryList.add(queryEntry);

      Please help me.