> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# contact_and_person_freetextsearch

> Provider for selecting a Contact or a Person Does keyword matching and scoring across multiple string fields. Checks name, department, soundex fields. Additional - <list type="bullet"><item>Name = Person or PersonContact or ContactPerson</item><item>AddContact = true or false - add a contact item for person items</item><item>ExpandContact = TRUE or false - add all persons for a contact items</item><item>SkipRetired = TRUE or false - skip retired persons</item><item>ContactId = 123 - boost persons belonging to contact id in results rank</item></list>

## "contact\_and\_person\_freetextsearch" MDO List

Provider for selecting a Contact or a Person
Does keyword matching and scoring across multiple
string fields. Checks name, department, soundex fields.

Additional:
<list type="bullet"><item>Name = Person or PersonContact or ContactPerson</item><item>AddContact = true or false - add a contact item for person items</item><item>ExpandContact = TRUE or false - add all persons for a contact items</item><item>SkipRetired = TRUE or false - skip retired persons</item><item>ContactId = 123 - boost persons belonging to contact id in results rank</item></list>

User's own contacts, recently added + modified contacts, contacts modified or created by user.
Matches on word boundaries or at start of field are scored extra highly.

Returns contact or person items: Id = contact\_id or person\_id, ExtraInfo = "contact\_id"=contact\_id, Type = "Contact" or "Person", StyleHint = "stop"

Stopped contacts are marked with stylehint = "stop" (but item.deleted = false)

Implemented by the <see cref="T:SuperOffice.CRM.Lists.ContactAndPersonListFreetextSearchProvider">ContactAndPersonListFreetextSearchProvider</see> class.
The name of the MDO list is 'contact\_and\_person\_freetextsearch'.

## Additional Attributes

| Description                          | Name          | Example Value |
| ------------------------------------ | ------------- | ------------- |
| Person, PersonContact, ContactPerson | Name          | PersonContact |
| Add Contact items for person matches | AddContact    | True          |
| Add all persons for a contact match  | ExpandContact | True          |
| Skip retired employees               | skipRetired   | False         |
| Boost scores on this contact to top  | contactId     | 123           |

## Sample Request

```http! theme={null}
GET /api/v1/MDOList/contact_and_person_freetextsearch
Authorization: Basic dGplMDpUamUw
Accept: application/json; charset=utf-8
Accept-Language: *

```

## Sample Code

```cs theme={null}
var listProvider = ClassFactory.CreateRequired<SuperOffice.CRM.Lists.ISoListProviderFactory>().Create("contact_and_person_freetextsearch", forceFlatList: true);
foreach (var item in listProvider.RootItems) {
    Console.WriteLine("{0} {1} {2} {3}", 
         item.Id, ResourceManager.ParseInlineResources(item.Name), item.StyleHint, item.ExtraInfo);
}
```

## Sample Output

| Id | Name    | StyleHint | ExtraInfo |
| -- | ------- | --------- | --------- |
| 2  | Example |           |           |

## Related MDO Lists

* "contact\_and\_person\_freetextsearchheadings"
* "contact\_and\_person\_freetextsearchheadingswithallitem"
* "contact\_and\_person\_freetextsearchheadingswithallitemwithnoselection"
* "contact\_and\_person\_freetextsearchheadingswithnoselection"
* "contact\_and\_person\_freetextsearchwithallitem"
* "contact\_and\_person\_freetextsearchwithallitemwithnoselection"
* "contact\_and\_person\_freetextsearchwithnoselection"


## Related topics

- [combinedcontactpersonsearch](/en/api/mdo-providers/reference/combinedcontactpersonsearch.md)
- [MDO List Provider names](/en/api/mdo-providers/reference/index.md)
- [contact_and_person_freetextsearch_hierarchical](/en/api/mdo-providers/reference/contact_and_person_freetextsearch_hierarchical.md)
- [person_freetextsearch](/en/api/mdo-providers/reference/person_freetextsearch.md)
- [contact_freetextsearch](/en/api/mdo-providers/reference/contact_freetextsearch.md)
- [personcontact_freetextsearch](/en/api/mdo-providers/reference/personcontact_freetextsearch.md)
