aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--solr-8.3.1/bin/solr-8983.pid2
-rw-r--r--src/client/views/collections/CollectionSchemaCells.tsx31
-rw-r--r--src/client/views/collections/CollectionSchemaHeaders.tsx1
-rw-r--r--src/client/views/collections/CollectionSubView.tsx5
-rw-r--r--src/client/views/search/SearchBox.tsx36
5 files changed, 42 insertions, 33 deletions
diff --git a/solr-8.3.1/bin/solr-8983.pid b/solr-8.3.1/bin/solr-8983.pid
index c38baeeb6..e3e2416b2 100644
--- a/solr-8.3.1/bin/solr-8983.pid
+++ b/solr-8.3.1/bin/solr-8983.pid
@@ -1 +1 @@
-3436
+7933
diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx
index bf826857e..e50f95dca 100644
--- a/src/client/views/collections/CollectionSchemaCells.tsx
+++ b/src/client/views/collections/CollectionSchemaCells.tsx
@@ -247,12 +247,12 @@ export class CollectionSchemaCell extends React.Component<CellProps> {
if (StrCast(this.props.Document._searchString) !== "") {
const cfield = ComputedField.WithoutComputed(() => FieldValue(props.Document[props.fieldKey]));
let term = "";
- if (cfield!==undefined){
- if (cfield.Text!==undefined){
+ if (cfield !== undefined) {
+ if (cfield.Text !== undefined) {
term = cfield.Text;
}
- else if (StrCast(cfield)){
- term= StrCast(cfield);
+ else if (StrCast(cfield)) {
+ term = StrCast(cfield);
}
else {
term = String(NumCast(cfield));
@@ -261,8 +261,8 @@ export class CollectionSchemaCell extends React.Component<CellProps> {
let search = StrCast(this.props.Document._searchString)
let start = term.indexOf(search) as number;
let tally = 0;
- if (start!==-1){
- positions.push(start);
+ if (start !== -1) {
+ positions.push(start);
}
while (start < contents.length && start !== -1) {
term = term.slice(start + search.length + 1);
@@ -275,7 +275,8 @@ export class CollectionSchemaCell extends React.Component<CellProps> {
}
}
return (
- <div className="collectionSchemaView-cellContainer" style={{ cursor: fieldIsDoc ? "grab" : "auto" }} ref={dragRef} onPointerDown={this.onPointerDown} onPointerEnter={onPointerEnter} onPointerLeave={onPointerLeave}>
+ <div className="collectionSchemaView-cellContainer" style={{ cursor: fieldIsDoc ? "grab" : "auto" }}
+ ref={dragRef} onPointerDown={this.onPointerDown} onPointerEnter={onPointerEnter} onPointerLeave={onPointerLeave}>
<div className={className} ref={this._focusRef} onPointerDown={onItemDown} tabIndex={-1}>
<div className="collectionSchemaView-cellContents" ref={type === undefined || type === "document" ? this.dropRef : null} key={props.Document[Id]}>
<EditableView
@@ -294,21 +295,21 @@ export class CollectionSchemaCell extends React.Component<CellProps> {
// if (type === "number" && (contents === 0 || contents === "0")) {
// return "0";
// } else {
- const cfield = ComputedField.WithoutComputed(() => FieldValue(props.Document[props.fieldKey]));
- if (cfield!==undefined){
- if (cfield.Text!==undefined){
- return(cfield.Text);
+ const cfield = ComputedField.WithoutComputed(() => FieldValue(props.Document[props.fieldKey]));
+ if (cfield !== undefined) {
+ if (cfield.Text !== undefined) {
+ return (cfield.Text);
}
- else if (StrCast(cfield)){
+ else if (StrCast(cfield)) {
return StrCast(cfield);
}
else {
return String(NumCast(cfield));
}
}
- // console.log(cfield.Text);
- // console.log(StrCast(cfield));
- // return StrCast(cfield);
+ // console.log(cfield.Text);
+ // console.log(StrCast(cfield));
+ // return StrCast(cfield);
// }
}}
diff --git a/src/client/views/collections/CollectionSchemaHeaders.tsx b/src/client/views/collections/CollectionSchemaHeaders.tsx
index 0ee225407..a979f9838 100644
--- a/src/client/views/collections/CollectionSchemaHeaders.tsx
+++ b/src/client/views/collections/CollectionSchemaHeaders.tsx
@@ -430,7 +430,6 @@ export class KeysDropdown extends React.Component<KeysDropdownProps> {
render() {
- console.log(this.props.docs);
return (
<div className="keys-dropdown" style={{ zIndex: 10, width: this.props.width, maxWidth: this.props.width }}>
{this._key === this._searchTerm.slice(0, this._key.length) ?
diff --git a/src/client/views/collections/CollectionSubView.tsx b/src/client/views/collections/CollectionSubView.tsx
index dacb06e5b..4463eef3e 100644
--- a/src/client/views/collections/CollectionSubView.tsx
+++ b/src/client/views/collections/CollectionSubView.tsx
@@ -130,13 +130,16 @@ export function CollectionSubView<T, X>(schemaCtor: (doc: Doc) => T, moreProps?:
let childDocs = viewSpecScript ? docs.filter(d => viewSpecScript.script.run({ doc: d }, console.log).result) : docs;
const searchDocs = DocListCast(this.props.Document._searchDocs);
+ console.log(this.props.Document);
+ console.log(searchDocs);
if (searchDocs !== undefined && searchDocs.length > 0) {
+ console.log("yes");
childDocs = searchDocs;
}
const docFilters = this.docFilters();
const docRangeFilters = this.props.ignoreFields?.includes("_docRangeFilters") ? [] : Cast(this.props.Document._docRangeFilters, listSpec("string"), []);
- return this.props.Document.dontRegisterView ? docs : DocUtils.FilterDocs(docs, docFilters, docRangeFilters, viewSpecScript);
+ return this.props.Document.dontRegisterView ? childDocs : DocUtils.FilterDocs(childDocs, docFilters, docRangeFilters, viewSpecScript);
}
@action
diff --git a/src/client/views/search/SearchBox.tsx b/src/client/views/search/SearchBox.tsx
index 410e6afa5..60e935e98 100644
--- a/src/client/views/search/SearchBox.tsx
+++ b/src/client/views/search/SearchBox.tsx
@@ -188,11 +188,15 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc
@action.bound
onChange(e: React.ChangeEvent<HTMLInputElement>) {
this.layoutDoc._searchString = e.target.value;
- console.log(e.target.value);
this.newsearchstring = e.target.value;
if (e.target.value === "") {
+ console.log(this._results);
+ this._results.forEach(result => {
+ Doc.UnBrushDoc(result[0]);
+ });
+
this.props.Document._schemaHeaders = new List<SchemaHeaderField>([]);
if (this.currentSelectedCollection !== undefined) {
this.currentSelectedCollection.props.Document._searchDocs = new List<Doc>([]);
@@ -202,15 +206,15 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc
}
console.log("CLOSE");
runInAction(() => { this.open = false });
+ this._openNoResults = false;
+ this._results = [];
+ this._resultsSet.clear();
+ this._visibleElements = [];
+ this._numTotalResults = -1;
+ this._endIndex = -1;
+ this._curRequest = undefined;
+ this._maxSearchIndex = 0;
}
- this._openNoResults = false;
- this._results = [];
- this._resultsSet.clear();
- this._visibleElements = [];
- this._numTotalResults = -1;
- this._endIndex = -1;
- this._curRequest = undefined;
- this._maxSearchIndex = 0;
}
enter = (e: React.KeyboardEvent) => {
@@ -383,14 +387,11 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc
let newarray: Doc[] = [];
while (docs.length > 0) {
- console.log("iteration");
newarray = [];
docs.forEach((d) => {
- console.log(d);
if (d.data != undefined) {
let newdocs = DocListCast(d.data);
newdocs.forEach((newdoc) => {
- console.log(newdoc);
newarray.push(newdoc);
});
@@ -419,6 +420,7 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc
this._results = found;
this.docsforfilter = docsforFilter;
if (this.filter === true) {
+ console.log(docsforFilter);
selectedCollection.props.Document._searchDocs = new List<Doc>(docsforFilter);
}
this._numTotalResults = found.length;
@@ -498,6 +500,9 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc
this.new_buckets = {};
const query = StrCast(this.layoutDoc._searchString);
this.getFinalQuery(query);
+ this._results.forEach(result => {
+ Doc.UnBrushDoc(result[0]);
+ });
this._results = [];
this._resultsSet.clear();
this._isSearch = [];
@@ -675,7 +680,7 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc
@action.bound
closeSearch = () => {
- this.closeResults();
+ //this.closeResults();
this._searchbarOpen = false;
}
@@ -752,7 +757,7 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc
highlights.forEach((item) => headers.add(item));
this._visibleDocuments[i] = result[0];
this._isSearch[i] = "search";
- console.log(result[0]);
+ Doc.BrushDoc(result[0]);
Doc.AddDocToList(this.dataDoc, this.props.fieldKey, result[0]);
this.children++;
}
@@ -769,6 +774,7 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc
if (i < this._visibleDocuments.length) {
this._visibleDocuments[i] = result[0];
this._isSearch[i] = "search";
+ Doc.BrushDoc(result[0]);
Doc.AddDocToList(this.dataDoc, this.props.fieldKey, result[0]);
this.children++;
}
@@ -1117,7 +1123,7 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc
this.submitSearch();
})
}} />
- Workspace
+ Database
</label>
</div>
</div>