Contents
How do I search for nodes where an attribute has a particular value?
How do I set the value of an attribute in many nodes?
.................................................................................................................How do I search for nodes where an attribute has a particular value?
- If you want to restrict your search to part of the object base you can select one or more nodes in the catalog and the search will be restricted to their descendants, otherwise root will be used as the starting point. Unless you particularly want to search just a small part, starting at root can be faster.
- Select the Catalog/Search Menu item and the Search Wizard will appear.
- Select which type of node you want to search, category, group or item. If any type does not have any attributes then they will be greyed out, as they cannot be searched.
- Select which page(s) contain the attributes you will be using in your search. This stage helps cut down the list of attributes in the next stage. You may select more than one page.
- Select the attribute(s) that you want to use in your search. You may select more than one attribute.
- Build up your search criterion. On this page in the wizard you see:
- a blank text box;
- a row containing two drop down menus for Attribute and Operator, a text or other box(es) for entering values for the attribute, (the type of box(es) will vary depending on the type of the attribute selected from the drop down menu), and an "ok" button;
- a row of buttons containing the boolean operators that we need to construct a complex criterion, and a clear button.
How do I set the value of an attribute in many nodes?
The nodes all have to be the same type, Item, Group or Category. Place all the nodes into a List either by using the Entity/Make List menu item or by performing a search. Select all the items on the list for which the attribute value needs setting and on the right-click popup menu you will find Set Attribute Values and a submenu of attribute names. Select the name of the attribute you wish to set, fill in the new value on the dialog that will appear and the new value will be set in all the nodes.
Top .................................................................................................................How do I create an Index?
If you want to create an index in a category then select that category in the catalog and from the Catalog menu select index; the index wizard will then appear:
- Node Type
- The first stage is to decide whether to index items or groups, both are possible though items are the most common. If one type, group or item, has no indexable attributes then it will be greyed out and cannot be selected. Some attribute types, for example files and folders, are not indexable, because it does not make sense to construct indexes from their values.
- Select Attribute
- The next stage is to select which of the indexable attributes available is to be used for the index. Only one may be selected from the list.
- Select Index Type
- What comes next depends on the type of the attribute. There are three possible
types of index. If only Distinct Value is possible for the selected
attributes type then this stage will be omitted. If the attribute is a Set
then things get a bit more complicated because it is necessary to define the
name(s) and type(s) of possible set elements as well as how to index on their value.
Distinct Value This is the commonest type, each distinct value represents a different index group. This makes obvious sense in, for example, an enumerated or reference attribute, for a String or Number attribute it probably will not since you will end up with a lot of index groups each containing exactly one item.
Way Points This is the way to define index groups that cover a range of values, for attribute types such as String and Number where that makes sense. In an additional stage Specify Range Details give the start and end points of each range that represents an index group. OpenJean can easily cope with overlapping ranges and ranges with gaps in between if that is what you want.
Alphabetical This only applies to String attributes. An index group is created for each letter of the alphabet, and each item is indexed according to its first letter. - Select category
- Finally select the category to be indexed, normally that category will have been
selected first and will already be pre-selected when you reach this stage. There
are some circumstances in which this will not happen so the selection can be
made or changed here.
The index will now be created. This could take some time if there a lot of items in the category.