You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by AhyoungRyu <gi...@git.apache.org> on 2016/08/02 20:16:56 UTC

[GitHub] zeppelin pull request #1266: [ZEPPELIN-1219] Add searching feature to Zeppel...

GitHub user AhyoungRyu opened a pull request:

    https://github.com/apache/zeppelin/pull/1266

    [ZEPPELIN-1219] Add searching feature to Zeppelin docs site

    ### What is this PR for?
    As more and more document pages are added, it's really hard to find specific pages. So I added searching feature to Zeppelin documentation site([jekyll](https://jekyllrb.com/) based site) using [lunr.js](http://lunrjs.com/).
    
     - **How it works?**
      
      I created [`search_data.json`](https://github.com/AhyoungRyu/zeppelin/blob/6e02423f541cc406e4e41031629609a276a9f481/docs/search_data.json) which is used for docs info template. `lunr.js` combines all of the text from all of the docs in `docs/` into `_site/search_data.json`. It looks like below.
    ![screen shot 2016-08-03 at 4 49 59 am](https://cloud.githubusercontent.com/assets/10060731/17342828/f2908be8-5935-11e6-8eee-b189677c0531.png)
    All the info are comes from [Jekyll YAML front matter](https://jekyllrb.com/docs/frontmatter/) variables. (i.e. title, group, description.. that's why I rewrote all docs' title and description.)
    Using this data, [search.js](https://github.com/AhyoungRyu/zeppelin/blob/6e02423f541cc406e4e41031629609a276a9f481/docs/assets/themes/zeppelin/js/search.js) will do this job!
    
    ### What type of PR is it?
    Improvement & Feature
    
    ### Todos
    * [x] - Keep consistency for all docs pages' `Title`
    * [x] - Add some overview sentences to all docs pages' `Description` section (this will be used as the result preview)
    * [x] - Add apache license header to all docs page (some pages are missing the license header currently)
    * [x] - Add LICENSE for `lunr.min.js`
    
    ### What is the Jira issue?
    [ZEPPELIN-1219](https://issues.apache.org/jira/browse/ZEPPELIN-1219)
    
    ### How should this be tested?
    1. Build docs site -> please see [docs/README.md#build-documentation](https://github.com/apache/zeppelin/tree/master/docs#build-documentation)
    2. Click `search` icon in navbar and go to `search.html` page
    3. Type anything you want to search in the search bar (i.e. type `python`, `spark`, `dynamic` ... )
    
    ### Screenshots (if appropriate)
    <img width="985" alt="screen shot 2016-08-03 at 5 01 46 am" src="https://cloud.githubusercontent.com/assets/10060731/17343202/71185300-5937-11e6-9e57-687bf2839cfb.png">
    
    ![search](https://cloud.githubusercontent.com/assets/10060731/17343154/3df052f2-5937-11e6-950a-ba922576914d.gif)
    
    ### Questions:
    * Does the licenses files need update? Yes, for `lunr.min.js`
    * Is there breaking changes for older versions? no
    * Does this needs documentation? no


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/AhyoungRyu/zeppelin ZEPPELIN-1219

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zeppelin/pull/1266.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1266
    
----
commit 881a6b036e70bfb05f12c8a633f10c873508de9d
Author: AhyoungRyu <fb...@hanmail.net>
Date:   2016-08-02T19:11:27Z

    Add js files: lunr.min.js & search.js

commit d261a63a7581ed0cc7ca3d78c46ae4b074a17ba7
Author: AhyoungRyu <fb...@hanmail.net>
Date:   2016-08-02T19:13:25Z

    Add template for storing docs info based on jekyll front matter

commit 495d6c420d975653f48926e055cc299e043daaa8
Author: AhyoungRyu <fb...@hanmail.net>
Date:   2016-08-02T19:16:27Z

    Keep consistency all docs' front matter for the right search result

commit 09e023d86cfc48794f3df53529266f8fd6e65832
Author: AhyoungRyu <fb...@hanmail.net>
Date:   2016-08-02T19:16:51Z

    Add search icon to navbar

commit d55ce76f310634298c5605f8b5a9ff2e1f3dcd6c
Author: AhyoungRyu <fb...@hanmail.net>
Date:   2016-08-02T19:17:08Z

    Add searching page

commit d24c536f67c597db77751cbb383d113916bf769e
Author: AhyoungRyu <fb...@hanmail.net>
Date:   2016-08-02T19:19:02Z

    Attach 'Apache Zeppelin ZEPPELIN_VERSION Documentation: ' to title

commit 6e02423f541cc406e4e41031629609a276a9f481
Author: AhyoungRyu <fb...@hanmail.net>
Date:   2016-08-02T19:20:03Z

    Apply css style for the search results

commit 0f3457d8c4aaebe4419f68c48a6422494d54a2d2
Author: AhyoungRyu <fb...@hanmail.net>
Date:   2016-08-02T20:12:11Z

    Add lunr.min.js license info

commit e6ab4b7a424f6681001eb14dffad9bdae4b2e03d
Author: AhyoungRyu <fb...@hanmail.net>
Date:   2016-08-02T20:12:42Z

    Exclude lunr.min.js

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1266: [ZEPPELIN-1219] Add searching feature to Zeppelin docs...

Posted by bzz <gi...@git.apache.org>.
Github user bzz commented on the issue:

    https://github.com/apache/zeppelin/pull/1266
  
    > Yeah right, I should've done that. It was my bad. Let me re-trigger CI then :)
    
    No worries! A lot of people do not do this and ask no excuses. So let's just show them what excellence means, by annotating further CI failures in case of any, as you did for the last one here :) 
    
    Different profile fails with the same flaky test, not relevant to the changeset.
    
    Looks great to me, and merging to master if there is no further discussion!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1266: [ZEPPELIN-1219] Add searching feature to Zeppelin docs...

Posted by AhyoungRyu <gi...@git.apache.org>.
Github user AhyoungRyu commented on the issue:

    https://github.com/apache/zeppelin/pull/1266
  
    @bzz After re-triggered CI build, it fails again only in `spark 1.4\ scala 2.10` with
    
    ```
    Running org.apache.zeppelin.rest.ZeppelinSparkClusterTest
    ...
    No output has been received in the last 10 minutes, this potentially indicates a stalled build or something wrong with the build itself.
    
    The build has been terminated
    ```



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1266: [ZEPPELIN-1219] Add searching feature to Zeppelin docs...

Posted by AhyoungRyu <gi...@git.apache.org>.
Github user AhyoungRyu commented on the issue:

    https://github.com/apache/zeppelin/pull/1266
  
    @bzz 
    >In my experience if PR author try to follow such steps - that speeds up the review process by order of magnitude AND helps the project to make CI more stable.
    
    Yeah right, I should've done that. It was my bad. Let me re-trigger CI then :)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin pull request #1266: [ZEPPELIN-1219] Add searching feature to Zeppel...

Posted by AhyoungRyu <gi...@git.apache.org>.
Github user AhyoungRyu closed the pull request at:

    https://github.com/apache/zeppelin/pull/1266


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin pull request #1266: [ZEPPELIN-1219] Add searching feature to Zeppel...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/zeppelin/pull/1266


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1266: [ZEPPELIN-1219] Add searching feature to Zeppelin docs...

Posted by bzz <gi...@git.apache.org>.
Github user bzz commented on the issue:

    https://github.com/apache/zeppelin/pull/1266
  
    Great improvement @AhyoungRyu ! Posted few suggestions above.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin pull request #1266: [ZEPPELIN-1219] Add searching feature to Zeppel...

Posted by AhyoungRyu <gi...@git.apache.org>.
GitHub user AhyoungRyu reopened a pull request:

    https://github.com/apache/zeppelin/pull/1266

    [ZEPPELIN-1219] Add searching feature to Zeppelin docs site

    ### What is this PR for?
    As more and more document pages are added, it's really hard to find specific pages. So I added searching feature to Zeppelin documentation site([jekyll](https://jekyllrb.com/) based site) using [lunr.js](http://lunrjs.com/).
    
     - **How does it work?**
      
      I created [`search_data.json`](https://github.com/AhyoungRyu/zeppelin/blob/6e02423f541cc406e4e41031629609a276a9f481/docs/search_data.json) which is used for docs info template. `lunr.js` combines all of the text from all of the docs in `docs/` into `_site/search_data.json`. It looks like below.
    ![screen shot 2016-08-03 at 4 49 59 am](https://cloud.githubusercontent.com/assets/10060731/17342828/f2908be8-5935-11e6-8eee-b189677c0531.png)
    All the info are comes from [Jekyll YAML front matter](https://jekyllrb.com/docs/frontmatter/) variables. (i.e. title, group, description.. that's why I rewrote all docs' title and description.)
    [search.js](https://github.com/AhyoungRyu/zeppelin/blob/6e02423f541cc406e4e41031629609a276a9f481/docs/assets/themes/zeppelin/js/search.js) will do this job using this data!
    
    ### What type of PR is it?
    Improvement & Feature
    
    ### Todos
    * [x] - Keep consistency for all docs pages' `Title`
    * [x] - Add some overview sentences to all docs pages' `Description` section (this will be used as the result preview)
    * [x] - Add apache license header to all docs page (some pages are missing the license header currently)
    * [x] - Add LICENSE for `lunr.min.js`
    
    ### What is the Jira issue?
    [ZEPPELIN-1219](https://issues.apache.org/jira/browse/ZEPPELIN-1219)
    
    ### How should this be tested?
    1. Apply this patch and build `ZEPPELIN_HOME/docs` dir -> please see [docs/README.md#build-documentation](https://github.com/apache/zeppelin/tree/master/docs#build-documentation)
    2. Click `search` icon in navbar and go to `search.html` page
    3. Type anything you want to search in the search bar (i.e. type `python`, `spark`, `dynamic` ... )
    
    ### Screenshots (if appropriate)
    ![screen shot 2016-08-03 at 4 42 28 pm](https://cloud.githubusercontent.com/assets/10060731/17357851/d092e2ca-5999-11e6-9917-a3d4113e6e43.png)
    
    
    ![search](https://cloud.githubusercontent.com/assets/10060731/17357828/b2486cd6-5999-11e6-873b-121fac033b03.gif)
    
    
    ### Questions:
    * Does the licenses files need update? Yes, for `lunr.min.js`
    * Is there breaking changes for older versions? no
    * Does this needs documentation? no


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/AhyoungRyu/zeppelin ZEPPELIN-1219

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zeppelin/pull/1266.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1266
    
----
commit 0705bd6beaade4270f44ec344abc10ee6e0a5759
Author: AhyoungRyu <fb...@hanmail.net>
Date:   2016-08-02T19:11:27Z

    Add js files: lunr.min.js & search.js

commit 040f53244c8557d81135aaa094347853da5ec576
Author: AhyoungRyu <fb...@hanmail.net>
Date:   2016-08-02T19:13:25Z

    Add template for storing docs info based on jekyll front matter

commit 0688a79b85c9ee2905a687c8fd969e01a746c220
Author: AhyoungRyu <fb...@hanmail.net>
Date:   2016-08-02T19:16:27Z

    Keep consistency all docs' front matter for the right search result

commit a951fa63f09171b1f113f01d51c3b99474a00c52
Author: AhyoungRyu <fb...@hanmail.net>
Date:   2016-08-02T19:16:51Z

    Add search icon to navbar

commit d908c371b2baa462121cb0e96035ddd43b8253d4
Author: AhyoungRyu <fb...@hanmail.net>
Date:   2016-08-02T19:17:08Z

    Add searching page

commit 68eb997b188d9838b2914c399000fa75bb9d9e94
Author: AhyoungRyu <fb...@hanmail.net>
Date:   2016-08-02T19:19:02Z

    Attach 'Apache Zeppelin ZEPPELIN_VERSION Documentation: ' to title

commit f6a05a6351c31093d398b18e8eb19637438566c2
Author: AhyoungRyu <fb...@hanmail.net>
Date:   2016-08-02T19:20:03Z

    Apply css style for the search results

commit 36ba7f1b15225d552ed8ad12c5af807ae7f50778
Author: AhyoungRyu <fb...@hanmail.net>
Date:   2016-08-02T20:12:11Z

    Add lunr.min.js license info

commit da0cff97aa0531472b42db0e92b7807b4975bf24
Author: AhyoungRyu <fb...@hanmail.net>
Date:   2016-08-02T20:12:42Z

    Exclude lunr.min.js

commit fa0129942d75fd556fe87e7f5d4787882ce93f5a
Author: AhyoungRyu <fb...@hanmail.net>
Date:   2016-08-03T04:38:33Z

    Refine 'description' in some docs as @bzz suggested

commit ee11136efa4764f61d6601ea0f45f004943d6453
Author: AhyoungRyu <fb...@hanmail.net>
Date:   2016-08-03T04:46:50Z

    Fix some typos

commit 6e775f5c28b80538fff1484b4eb1f66c795ca2c1
Author: AhyoungRyu <fb...@hanmail.net>
Date:   2016-08-03T05:27:10Z

    Make pleasecontribute.md not to be searched

commit 1381152effb7d5026fbaa2b7f8cd51e23ec74e20
Author: AhyoungRyu <fb...@hanmail.net>
Date:   2016-08-03T05:57:24Z

    Fix search result skipping issue

commit 624b0515ea26e1090f088809cf245742964c03fa
Author: AhyoungRyu <fb...@hanmail.net>
Date:   2016-08-03T06:46:24Z

    Add Apache license header to search.js

commit bd4956a17bb8ba59e92b1b1da391059183e5c16b
Author: AhyoungRyu <fb...@hanmail.net>
Date:   2016-08-03T06:48:23Z

    Add docs.js & search.js to exclude list in pom.xml

commit 9f1ba42fc2e2a11df06089f70cf5cffa5b6ee3fb
Author: AhyoungRyu <fb...@hanmail.net>
Date:   2016-08-03T07:12:51Z

    Disable enterkey press & change icon

commit 0389d28d2faa85ffb390096f491b7a2caa3401e6
Author: AhyoungRyu <fb...@hanmail.net>
Date:   2016-08-03T07:47:28Z

    Make index.md not to be searched

commit 6784282bedd18cb2903e7dd1cefcfddee01b63ab
Author: AhyoungRyu <fb...@hanmail.net>
Date:   2016-08-03T07:47:49Z

    Minor search page UI update

commit 34afd5d061e41702b00b0bbf7065e9bf1e61cd23
Author: AhyoungRyu <fb...@hanmail.net>
Date:   2016-08-04T03:18:21Z

    Add Apache license header to search_data.json

commit 91b71a72b081a8c2fe7a774db7c735d2c6f30715
Author: AhyoungRyu <fb...@hanmail.net>
Date:   2016-08-06T05:38:15Z

    Remove Apache license header since JSON doesn't allow comment

commit 7ec885486065527d52608a16152d04b6e729d00c
Author: AhyoungRyu <fb...@hanmail.net>
Date:   2016-08-06T05:50:25Z

    Modify 'no result' sentence

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1266: [ZEPPELIN-1219] Add searching feature to Zeppelin docs...

Posted by AhyoungRyu <gi...@git.apache.org>.
Github user AhyoungRyu commented on the issue:

    https://github.com/apache/zeppelin/pull/1266
  
    @bzz Really appreciate for your all precise comments! Updated several docs as you suggested :)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1266: [ZEPPELIN-1219] Add searching feature to Zeppelin docs...

Posted by AhyoungRyu <gi...@git.apache.org>.
Github user AhyoungRyu commented on the issue:

    https://github.com/apache/zeppelin/pull/1266
  
    It seems the CI failure is irrelevant with this PR. Can someone review this one?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1266: [ZEPPELIN-1219] Add searching feature to Zeppelin docs...

Posted by bzz <gi...@git.apache.org>.
Github user bzz commented on the issue:

    https://github.com/apache/zeppelin/pull/1266
  
    @AhyoungRyu it's better to post CI failure to help getting feedback faster AND search existing JIRA issues, to see if that is something know or being addressed elsewhere.
    
    Here is an example of what I mean for this PR:
    
    ------
    
    Single CI profile Spark 1.4\Scala 2.10 is failing here with
    ```
    [INFO] Building Zeppelin: Server 0.7.0-SNAPSHOT
    ...
    Running org.apache.zeppelin.rest.ZeppelinSparkClusterTest
    ....
    org.apache.zeppelin.interpreter.LazyOpenInterpreter@20ea2ef9
    
    No output has been received in the last 10 minutes, this potentially indicates a stalled build or something wrong with the build itself.
    
    The build has been terminated
    ```
    
    [Searching JIRA for `ZeppelinSparkClusterTest`](https://github.com/GoogleCloudPlatform/dataproc-initialization-actions/issues/56) brings [ZEPPELIN-862](https://issues.apache.org/jira/browse/ZEPPELIN-862) which looks very similar and is not relevant to this changes. This PR has been added to that issue to track this flaky tests 
    
    ------
    Hope this helps! 
    
    In my experience if PR author try to follow such steps - that speeds up the review process by order of magnitude AND helps the project to make CI more stable.
    
    Documentation update + search looks great to me, merging if there is no further discussion.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---