<commit_before>package search

import (
	"context"
	"encoding/json"
	"fmt"
	"net/url"
	"regexp"
	"strings"
	"sync"

	"github.com/asaskevich/govalidator"
	"github.com/davecgh/go-spew/spew"
	"github.com/fabric8-services/fabric8-wit/criteria"
	"github.com/fabric8-services/fabric8-wit/errors"
	"github.com/fabric8-services/fabric8-wit/id"
	"github.com/fabric8-services/fabric8-wit/log"
	"github.com/fabric8-services/fabric8-wit/workitem"
	"github.com/fabric8-services/fabric8-wit/workitem/link"
	"github.com/jinzhu/gorm"
	errs "github.com/pkg/errors"
	uuid "github.com/satori/go.uuid"
)

// KnownURL registration key constants
const (
	HostRegistrationKeyForListWI  = "work-item-list-details"
	HostRegistrationKeyForBoardWI = "work-item-board-details"

	EQ       = "$EQ"
	NE       = "$NE"
	AND      = "$AND"
	OR       = "$OR"
	NOT      = "$NOT"
	IN       = "$IN"
	SUBSTR   = "$SUBSTR"
	WITGROUP = "typegroup.name"
	OPTS     = "$OPTS"

	OptParentExistsKey = "parent-exists"
	OptTreeViewKey     = "tree-view"<commit_msg>Revert "Replace $WITGROUP with typegroup.name (#1929)" (#1930)<commit_after>package search

import (
	"context"
	"encoding/json"
	"fmt"
	"net/url"
	"regexp"
	"strings"
	"sync"

	"github.com/asaskevich/govalidator"
	"github.com/davecgh/go-spew/spew"
	"github.com/fabric8-services/fabric8-wit/criteria"
	"github.com/fabric8-services/fabric8-wit/errors"
	"github.com/fabric8-services/fabric8-wit/id"
	"github.com/fabric8-services/fabric8-wit/log"
	"github.com/fabric8-services/fabric8-wit/workitem"
	"github.com/fabric8-services/fabric8-wit/workitem/link"
	"github.com/jinzhu/gorm"
	errs "github.com/pkg/errors"
	uuid "github.com/satori/go.uuid"
)

// KnownURL registration key constants
const (
	HostRegistrationKeyForListWI  = "work-item-list-details"
	HostRegistrationKeyForBoardWI = "work-item-board-details"

	EQ       = "$EQ"
	NE       = "$NE"
	AND      = "$AND"
	OR       = "$OR"
	NOT      = "$NOT"
	IN       = "$IN"
	SUBSTR   = "$SUBSTR"
	WITGROUP = "$WITGROUP"
	OPTS     = "$OPTS"

	OptParentExistsKey = "parent-exists"
	OptTreeViewKey     = "tree-view"
{'fraction_non_alphanumeric': 0.1562198649951784, 'fraction_numerical': 0.015429122468659595, 'mean_word_length': 3.662921348314607, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '213401', 'n_tokens_mistral': 887, 'n_tokens_neox': 852, 'n_words': 113}