| ... |
... |
@@ -27,11 +27,6 @@ |
| 27 |
27 |
a { |
| 28 |
28 |
color: var(--color-brand-primary, blue); |
| 29 |
29 |
} |
| 30 |
|
- .rawResults { |
| 31 |
|
- display: flex; |
| 32 |
|
- font-size: 12px; |
| 33 |
|
- margin-top: 2em; |
| 34 |
|
- } |
| 35 |
35 |
`; |
| 36 |
36 |
constructor() { |
| 37 |
37 |
super(); |
| ... |
... |
@@ -98,10 +98,7 @@ |
| 98 |
98 |
fetchFilterSearch() { |
| 99 |
99 |
return new Promise((resolve) => { |
| 100 |
100 |
if(this.hasActiveFilters()) { |
| 101 |
|
- fetch(this.filterUrl).then(res => res.json()).then((res) => { |
| 102 |
|
- this.collabFiltersResults = res; |
| 103 |
|
- resolve(res); |
| 104 |
|
- }); |
|
96 |
+ fetch(this.filterUrl).then(res => res.json()).then((res) => resolve(res)); |
| 105 |
105 |
} else { |
| 106 |
106 |
resolve([]); |
| 107 |
107 |
} |
| ... |
... |
@@ -144,17 +144,6 @@ |
| 144 |
144 |
</div> |
| 145 |
145 |
`)} |
| 146 |
146 |
</div> |
| 147 |
|
- <div class="rawResults"> |
| 148 |
|
- <div> |
| 149 |
|
- <strong>XWiki Search Results</strong> |
| 150 |
|
- <pre>${JSON.stringify(this.resultsCache, null, 2)}</pre> |
| 151 |
|
- </div> |
| 152 |
|
- <div> |
| 153 |
|
- <strong>Collab Search Results (Filters)</strong> |
| 154 |
|
- <pre>${JSON.stringify(this.collabFiltersResults, null, 2)}</pre> |
| 155 |
|
- </div> |
| 156 |
|
- </div> |
| 157 |
|
-</div> |
| 158 |
158 |
` |
| 159 |
159 |
} |
| 160 |
160 |
} |
| ... |
... |
@@ -165,7 +165,7 @@ |
| 165 |
165 |
require(['jquery'], function($) { |
| 166 |
166 |
const solrServiceURL = new XWiki.Document('SuggestSolrService', 'XWiki').getURL('get'); |
| 167 |
167 |
//contextSearchButton.addEventListener('click', function() { |
| 168 |
|
- $.post(solrServiceURL, { |
|
149 |
+ $.get(solrServiceURL, { |
| 169 |
169 |
outputSyntax: 'plain', |
| 170 |
170 |
media: 'json', |
| 171 |
171 |
query: [ |