Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Welcome to the CollectiveAccess support forum! Here the developers and community answer questions related to use of the software. Please include the following information in every new issue posted here:

  1. Version of the software that is used, along with browser and version

  2. If the issue pertains to Providence, Pawtucket or both

  3. What steps you’ve taken to try to resolve the issue

  4. Screenshots demonstrating the issue

  5. The relevant sections of your installation profile or configuration including the codes and settings defined for your local elements.


If your question pertains to data import or export, please also include:

  1. Data sample

  2. Your mapping


Answers may be delayed for posts that do not include sufficient information.

How to configure "type-ahead"

Using Providence (CA version: 1.7.8)

Hi,
When creating a record and I type in a value for a field (in this case) of type Entity, CA's "type-ahead" feature presents me with a list of matches that I can select from. This works as advertised, and as far as I can tell, what comes up is a list of 'displayname'.

I would like to know how to modify the "type-ahead" feature to do the following:

1- change from a list of 'displayname' to (say) a list of 'surname' (ideally, I would like to change it to two appended fields; e.g. 'displayname' + ' ' + 'some_other_field')
2- I'd also like to know where I can specify which fields are used (by the "type-ahead" feature) when it does a search

For (1), I was able to find that the 'app.conf' is where one would specify the template:

https://collectiveaccess.org/support/index.php?p=/discussion/300134/type-ahead-lookup

but looking at the 'app.conf' file, I didn't see any mention of "type-ahead" and saw only two instances of 'displayname'...which I tried changing to 'forename' (as a test) but didn't seem to have any effect.

For (2), the idea would be to limit what fields "type-ahead" searches on, in order to decrease the amount of suggestions. We'd like to mitigate the potential for false positives.

Please let me know if you need more information, screenshots, etc...

cheers,
Denis

Comments

  • Hi Denis. The setting your looking for is ca_entities_lookup_settings in app.conf. You would need to modify search indexing to limit the fields searched in the type ahead. See here for more information: https://docs.collectiveaccess.org/wiki/Search_Indexing_Configuration

  • Sorry for the late reply; other project priorities came up.

    Thank you very much for your response.

    I'm still not sure how to limit the fields searched in the type-ahead.

    What I have is the following:

    The "Personnel" input is where I'm trying to modify the type-ahead behavior (which fields are searched).

    I experimented by modifying the ca_entities section here:

    and later on, I experimented with the "ca_objects->ca_objects_x_entities" section here:

    In the ca_entities section, I tried replacing "_metadata" by individual fields, and that made no difference (the type-ahead always searches on all fields...which is what I want to avoid).
    In the ca_objects->ca_objects_x_entities section, I tried adding individual fields there, but that caused the indices rebuild to fail.

    For both cases, I experimented with different permutations of "ca_attribute_.....", because I wasn't sure if the actual attribute name to use was the one defined in the basic table (label bundle), or the one from my custom type.

    So my question:
    Would you be able to guide me as to which section of the "search_indexing.conf" file I should be tinkering with, and the exact syntax to use? (Let's say the attribute for Personnel is called "some_id"....so, "ca_attribute_some_id")?

    cheers,
    Denis

Sign In or Register to comment.