<commit_before>// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP

import React, { Component } from 'react';
import Query from 'grommet-addons/utils/Query';
import DocsArticle from '../../components/DocsArticle';

let query = new Query('(a OR b) AND (n:v OR n:w) "big deal" NOT ' +
  '01:23:45:67:89:ab 2016-01-31T16:45:46Z');
let errorQuery = new Query('a b "');

export default class QueryDoc extends Component {

  render () {
    return (
      <DocsArticle title='Query'>

        <section>
          <p>Utility functions for managing search and filter contexts. It can
            be used for:</p>
          <ul>
            <li>User typed text containing simple text terms, which
              might be quoted. For
              instance, <strong>name</strong> or <strong>
              'search term'</strong>.</li>
            <li>User typed text containing faceted filter terms. For
              instance, <strong>name:value</strong>.</li>
            <li>Combined text terms, faceted filters, and boolean logic. The
              boolean logic available
              includes <code>AND</code>, <code>OR</code>, <code>NOT</code>, and
              parentheses for grouping.</li>
          </ul>
        </section>

        <section>
          <h2>Constructor</h2>

          <dl>
            <dt><code>string</code></dt>
            <dd>Typically, this is the user typed text string.</dd>
          </dl>

          <h2>Methods</h2><commit_msg>add grommet-addons note to Query (#244)<commit_after>// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP

import React, { Component } from 'react';
import Query from 'grommet-addons/utils/Query';
import DocsArticle from '../../components/DocsArticle';

let query = new Query('(a OR b) AND (n:v OR n:w) "big deal" NOT ' +
  '01:23:45:67:89:ab 2016-01-31T16:45:46Z');
let errorQuery = new Query('a b "');

export default class QueryDoc extends Component {

  render () {
    return (
      <DocsArticle title='Query'>

        <section>
          <p>Utility functions for managing search and filter contexts. It can
            be used for:</p>
          <ul>
            <li>User typed text containing simple text terms, which
              might be quoted. For
              instance, <strong>name</strong> or <strong>
              'search term'</strong>.</li>
            <li>User typed text containing faceted filter terms. For
              instance, <strong>name:value</strong>.</li>
            <li>Combined text terms, faceted filters, and boolean logic. The
              boolean logic available
              includes <code>AND</code>, <code>OR</code>, <code>NOT</code>, and
              parentheses for grouping.</li>
          </ul>
          <p><strong>NOTE:</strong> This component comes from
            the <code>grommet-addons</code> repository. You will need to add
            a dependency to that repository in order to use it.</p>
        </section>

        <section>
          <h2>Constructor</h2>

          <dl>
            <dt><code>string</code></dt>
            <dd>Typically, this is the user typed text string.</dd>
          </dl>

          <h2>Methods</h2>
{'fraction_non_alphanumeric': 0.12425290972003775, 'fraction_numerical': 0.023592324630386914, 'mean_word_length': 2.1610337972167, 'pattern_counts': {'":': 0, '<': 85, '<?xml version=': 0, '>': 85, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5971950', 'n_tokens_mistral': 956, 'n_tokens_neox': 888, 'n_words': 289}